diff options
-rw-r--r-- | rdiff-backup/CHANGELOG | 3 | ||||
-rwxr-xr-x | rdiff-backup/rdiff-backup-statistics | 19 |
2 files changed, 20 insertions, 2 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 089a709..68f9382 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.2.3 (????/??/??) --------------------------- +Print nicer error messages in rdiff-backup-statistics (without tracebacks). +Closes Ubuntu bug #292586. (Andrew Ferguson) + Properly handle EINVAL "Invalid argument" errors when setting extended attributes. Thanks to Kevin Fenzi for reporting the issue. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff-backup-statistics b/rdiff-backup/rdiff-backup-statistics index 9627e87..36a3ede 100755 --- a/rdiff-backup/rdiff-backup-statistics +++ b/rdiff-backup/rdiff-backup-statistics @@ -22,7 +22,7 @@ import os, sys, re, getopt from rdiff_backup import connection, regress, rpath, Globals, restore, \ - Time, lazy, FilenameMapping + Time, lazy, FilenameMapping, robust begin_time = None # Parse statistics at or after this time... end_time = None # ... and at or before this time (epoch seconds) @@ -443,5 +443,20 @@ def Main(): fst.print_top_dirs("increment size", lambda fs: fs.incsize) fst.print_top_dirs("number of files changed", lambda fs: fs.changed) -if __name__ == '__main__': Main() +def error_check_Main(): + """Run Main on arglist, suppressing stack trace for routine errors""" + try: + Main() + except SystemExit: + raise + except KeyboardInterrupt: + print "User abort" + except (Exception, KeyboardInterrupt), exc: + if robust.catch_error(exc): + print exc + else: + raise + + +if __name__ == '__main__': error_check_Main() |