refactor(CLI): use raw strings for argparser

That way, we should be save from contained '"' characters, and whatever
else.

Closes #100
This commit is contained in:
Sebastian Thiel
2015-05-05 20:02:26 +02:00
parent 362781e601
commit bbab1f2e38

View File

@@ -17,7 +17,7 @@
if isinstance(v, bool):
v = v and 'true' or 'false'
elif isinstance(v, basestring):
v = '"%s"' % v.replace('"', r'\"')
v = 'r##"%s"##' % v
elif isinstance(v, list):
v = 'vec![%s]' % ','.join('UploadProtocol::%s' % p.capitalize() for p in v)
return 'Some(%s)' % v