]> err.no Git - dak/commitdiff
dak/process_upload.py: convert exception to string
authorAnsgar Burchardt <ansgar@debian.org>
Wed, 15 Aug 2012 19:57:56 +0000 (21:57 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Wed, 15 Aug 2012 19:57:56 +0000 (21:57 +0200)
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

index bf5cda591d210c71ef735999b0a2643e11a04134..0f89f46b8765c0be4a65eb55b791b95a0995b980 100755 (executable)
@@ -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())