Commit 01a7f5ae authored by owsla's avatar owsla

Print nicer error messages in rdiff-backup-statistics


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@960 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent a60ede2c
New in v1.2.3 (????/??/??) 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 Properly handle EINVAL "Invalid argument" errors when setting extended
attributes. Thanks to Kevin Fenzi for reporting the issue. (Andrew Ferguson) attributes. Thanks to Kevin Fenzi for reporting the issue. (Andrew Ferguson)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
import os, sys, re, getopt import os, sys, re, getopt
from rdiff_backup import connection, regress, rpath, Globals, restore, \ 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... begin_time = None # Parse statistics at or after this time...
end_time = None # ... and at or before this time (epoch seconds) end_time = None # ... and at or before this time (epoch seconds)
...@@ -443,5 +443,20 @@ def Main(): ...@@ -443,5 +443,20 @@ def Main():
fst.print_top_dirs("increment size", lambda fs: fs.incsize) fst.print_top_dirs("increment size", lambda fs: fs.incsize)
fst.print_top_dirs("number of files changed", lambda fs: fs.changed) 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()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment