utils.py: another annotateException tweak
authorrgbecker
Wed, 08 Sep 2010 13:23:56 +0000
changeset 3437 65fc93c4c0c3
parent 3436 71adb475adee
child 3438 3cac4523a459
utils.py: another annotateException tweak
src/reportlab/lib/utils.py
--- a/src/reportlab/lib/utils.py	Wed Sep 08 11:33:43 2010 +0000
+++ b/src/reportlab/lib/utils.py	Wed Sep 08 13:23:56 2010 +0000
@@ -1132,8 +1132,8 @@
                 msg=msg.encode(enc)
             else:
                 msg = str(msg)
-        if isinstance(v,IOError) and hasattr(v,'strerror'):
-            v.strerror = msg+'\n'+v.strerror
+        if isinstance(v,IOError) and getattr(v,'strerror',None):
+            v.strerror = msg+'\n'+str(v.strerror)
         else:
             A[e] += msg
     else: