From: W. Trevor King Date: Sat, 25 Feb 2012 17:04:01 +0000 (-0500) Subject: Hide the traceback on InvalidURL errors. X-Git-Tag: 1.1.0~160 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=17a470e5672d2f4ec2fc6d757a52612c21753ee8;p=be.git Hide the traceback on InvalidURL errors. In response to https://bugzilla.redhat.com/show_bug.cgi?id=733945 in which Neal Becker was bummed at the long traceback, which may initially look like a programming issue. --- diff --git a/libbe/ui/command_line.py b/libbe/ui/command_line.py index 59a9560..3a5f5c4 100644 --- a/libbe/ui/command_line.py +++ b/libbe/ui/command_line.py @@ -28,6 +28,8 @@ import libbe import libbe.bugdir import libbe.command import libbe.command.util +import libbe.storage +import libbe.storage.http import libbe.version import libbe.ui.util.pager import libbe.util.encoding @@ -305,6 +307,9 @@ def dispatch(ui, command, args): except libbe.storage.ConnectionError, e: print >> ui.io.stdout, 'Connection Error:\n', e return 1 + except libbe.storage.http.InvalidURL, e: + print >> ui.io.stdout, 'Invalid URL:\n', e + return 1 except (libbe.util.id.MultipleIDMatches, libbe.util.id.NoIDMatches, libbe.util.id.InvalidIDStructure), e: print >> ui.io.stdout, 'Invalid id:\n', e