Skip to content

Instantly share code, notes, and snippets.

@rail
Created December 15, 2011 15:18
Show Gist options
  • Save rail/1481448 to your computer and use it in GitHub Desktop.
Save rail/1481448 to your computer and use it in GitHub Desktop.
diff --git a/steps/misc.py b/steps/misc.py
--- a/steps/misc.py
+++ b/steps/misc.py
@@ -409,16 +409,17 @@ class SendChangeStep(ShellCommand):
if re.search('try: ', comments, re.MULTILINE):
comments = 'try: ' + ' '.join(processMessage(comments))
else:
try:
comments = comments.splitlines()[0]
except IndexError:
comments = ''
comments = re.sub(r'[\r\n^<>|;&"\'%$]', '_', comments)
+ comments = comments.encode('ascii', 'replace')
if comments:
bb_cmd.extend(['--comments', comments])
for key, value in sendchange_props:
bb_cmd.extend(['--property', '%s:%s' % (key, value)])
if files:
bb_cmd.extend(self.files)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment