From 17a470e5672d2f4ec2fc6d757a52612c21753ee8 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 25 Feb 2012 12:04:01 -0500 Subject: [PATCH] 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. --- libbe/ui/command_line.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.26.2