fix(CLI): escape subcommand descriptions

Otherwise, we could have had invalid rust strings.

[skip ci]
This commit is contained in:
Sebastian Thiel
2015-04-30 13:47:59 +02:00
parent bd27046cc8
commit fac50418a7

View File

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