summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xobnam11
1 files changed, 10 insertions, 1 deletions
diff --git a/obnam b/obnam
index 17aa3f83..d7e75052 100755
--- a/obnam
+++ b/obnam
@@ -16,7 +16,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import logging
import os
+import sys
+import traceback
import obnamlib
@@ -26,4 +29,10 @@ if "OBNAM_PROFILE" in os.environ:
cProfile.run('obnamlib.BackupApplication().run()',
os.environ["OBNAM_PROFILE"])
else:
- obnamlib.BackupApplication().run()
+ try:
+ obnamlib.BackupApplication().run()
+ except Exception, e:
+ logging.debug(traceback.format_exc())
+ logging.error(str(e))
+ sys.stdout.write("ERROR: %s\n" % str(e))
+ sys.exit(1)