From c767e14bc0a2bc36c852ba1e2639525ec274cd35 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 25 Feb 2012 15:47:58 -0500 Subject: I changed my mind and fixed #/03d07e61#. --- libbe/ui/command_line.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libbe') diff --git a/libbe/ui/command_line.py b/libbe/ui/command_line.py index d6e8d67..d6e820b 100644 --- a/libbe/ui/command_line.py +++ b/libbe/ui/command_line.py @@ -304,6 +304,9 @@ def dispatch(ui, command, args): except libbe.command.UserError, e: print >> ui.io.stdout, 'ERROR:\n', e return 1 + except OSError, e: + print >> ui.io.stdout, 'OSError:\n', e + return 1 except libbe.storage.ConnectionError, e: print >> ui.io.stdout, 'Connection Error:\n', e return 1 @@ -366,7 +369,12 @@ def main(): libbe.ui.util.pager.run_pager(paginate) ret = dispatch(ui, command, args) - ui.cleanup() + try: + ui.cleanup() + except IOError, e: + print >> ui.io.stdout, 'IOError:\n', e + return 1 + return ret if __name__ == '__main__': -- cgit