command_line.py 365 B

123456789101112131415161718
  1. #!/usr/bin/env python
  2. import backup
  3. import sys
  4. def main():
  5. try:
  6. backup.main(sys.argv[1:])
  7. except backup.BackupException as ex:
  8. print(ex)
  9. sys.exit(1)
  10. except Exception:
  11. from traceback import format_exc
  12. msg = "Error encountered:\n" + format_exc().strip()
  13. print(msg)
  14. sys.exit(1)