From: Ansgar Burchardt Date: Wed, 15 Aug 2012 19:57:56 +0000 (+0200) Subject: dak/process_upload.py: convert exception to string X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e69060c1cca5a08ee5ae4ad7232a9eb51d3d09c5;p=dak dak/process_upload.py: convert exception to string This fixes a type error when the code uses "+" to concat strings which we reach when we throw an exception in the exception handling code. --- diff --git a/dak/process_upload.py b/dak/process_upload.py index bf5cda59..0f89f46b 100755 --- a/dak/process_upload.py +++ b/dak/process_upload.py @@ -212,7 +212,7 @@ def try_or_reject(function): try: return function(directory, upload, *args, **kwargs) except (daklib.archive.ArchiveException, daklib.checks.Reject) as e: - reason = e + reason = unicode(e) except Exception as e: reason = "There was an uncaught exception when processing your upload:\n{0}\nAny original reject reason follows below.".format(traceback.format_exc())