From e69060c1cca5a08ee5ae4ad7232a9eb51d3d09c5 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Wed, 15 Aug 2012 21:57:56 +0200 Subject: [PATCH] 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. --- dak/process_upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) -- 2.39.2