]> git.ozlabs.org Git - patchwork/commitdiff
Python 2.4 exception printing compatibility
authorNate Case <ncase@xes-inc.com>
Fri, 22 Aug 2008 20:58:06 +0000 (15:58 -0500)
committerJeremy Kerr <jk@ozlabs.org>
Sat, 23 Aug 2008 03:04:43 +0000 (11:04 +0800)
Use str(ex) instead of ex.message for reporting exceptions

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/bin/parsemail.py

index 917cdd9862424751217864e723617505cfcb2694..8e73c258fce90e9354bf16275a0427e2be791dca 100755 (executable)
@@ -253,7 +253,7 @@ def main(args):
         try:
             patch.save()
         except Exception, ex:
-            print ex.message
+            print str(ex)
 
     if comment:
         if save_required:
@@ -267,7 +267,7 @@ def main(args):
         try:
             comment.save()
         except Exception, ex:
-            print ex.message
+            print str(ex)
 
     return 0