summaryrefslogtreecommitdiff
path: root/obnam
diff options
context:
space:
mode:
authorLars Wirzenius <liw@gytha>2009-06-19 10:27:42 +0300
committerLars Wirzenius <liw@gytha>2009-06-19 10:27:42 +0300
commit25d7f64a23482f85a3b73612f4aeffa75dbf44cc (patch)
tree0e8bbcba3c5055ae6e5b9f86431e10d5aa4154a0 /obnam
parentb931ab2ad100354b36ffd12dca5e3d1215250e6f (diff)
downloadobnam-25d7f64a23482f85a3b73612f4aeffa75dbf44cc.tar.gz
When reporting exceptions, if str(e) is empty, use repr(e) instead. MemoryError is one such exception.
Diffstat (limited to 'obnam')
-rwxr-xr-xobnam4
1 files changed, 2 insertions, 2 deletions
diff --git a/obnam b/obnam
index d7e75052..f41ad9d2 100755
--- a/obnam
+++ b/obnam
@@ -33,6 +33,6 @@ else:
obnamlib.BackupApplication().run()
except Exception, e:
logging.debug(traceback.format_exc())
- logging.error(str(e))
- sys.stdout.write("ERROR: %s\n" % str(e))
+ logging.error(str(e) or repr(e))
+ sys.stdout.write("ERROR: %s\n" % (str(e) or repr(e)))
sys.exit(1)