Skip to content

Commit

Permalink
Unicodify has different semantics to str
Browse files Browse the repository at this point in the history
Originally my patch was written with str()'s behaviour in mind. If a value is None, it gets cast.
I did not test my patch well enough following @nsoranzo's request to replace with unicodify(). In that case a raw None gets passed to cgi.escape() causing a bug
  • Loading branch information
hexylena committed May 10, 2016
1 parent 74e6d8b commit cd3f28d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/tools/errors.py
Expand Up @@ -209,7 +209,8 @@ def create_report( self, user, email='', message='', **kwd ):

# Escape all of the content for use in the HTML report
for parameter in report_variables.keys():
report_variables[parameter] = cgi.escape(unicodify(report_variables[parameter]))
if report_variables[parameter] is not None:
report_variables[parameter] = cgi.escape(unicodify(report_variables[parameter]))

self.html_report = string.Template( error_report_template_html ).safe_substitute( report_variables )

Expand Down

0 comments on commit cd3f28d

Please sign in to comment.