mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-28 04:03:21 -04:00
Merge pull request #19 from ThomasWaldmann/master
toplevel error handler: show tracebacks
This commit is contained in:
commit
756e284b0d
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import signal
|
|||
import stat
|
||||
import sys
|
||||
import textwrap
|
||||
import traceback
|
||||
|
||||
from attic import __version__
|
||||
from attic.archive import Archive, ArchiveChecker
|
||||
|
|
@ -852,12 +853,14 @@ def main():
|
|||
try:
|
||||
exit_code = archiver.run(sys.argv[1:])
|
||||
except Error as e:
|
||||
traceback.print_exc()
|
||||
archiver.print_error(e.get_message())
|
||||
exit_code = e.exit_code
|
||||
except RemoteRepository.RPCError as e:
|
||||
print(e)
|
||||
exit_code = 1
|
||||
except KeyboardInterrupt:
|
||||
traceback.print_exc()
|
||||
archiver.print_error('Error: Keyboard interrupt')
|
||||
exit_code = 1
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue