From e89d8f4c6f0f6193cca31b4399c39fc155735cac Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Thu, 25 Jun 2015 11:14:03 -0500 Subject: Handle errors and warnings with utf8 characters --- export.py | 2 +- export_json.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/export.py b/export.py index 41643a9..5f358cb 100644 --- a/export.py +++ b/export.py @@ -376,7 +376,7 @@ def export_all_to_directory(data, outputdir): # Force errors. templates = list(templates) except ExportFailure, e: - warn('export failed: %s: %s' % (name, e.message)) + warn('export failed: %s: %s' % (name.encode('utf-8').strip(), e.message.encode('utf-8').strip())) yield(name, templates) diff --git a/export_json.py b/export_json.py index 0ba10d6..a24d00f 100644 --- a/export_json.py +++ b/export_json.py @@ -17,7 +17,7 @@ def main(): # Force errors. templates = list(templates) except export.ExportFailure, e: - export.warn('export failed: %s: %s' % (name, e.message)) + export.warn('export failed: %s: %s' % (name.encode('utf-8').strip(), e.message.encode('utf-8').strip())) for template in templates: tname = template.name -- cgit v1.2.3