Browse Source

Add UINotImportable exception handling

suites/jessie-proposed-backports
Chris Lawrence 16 years ago
parent
commit
2119ee3c65
  1. 11
      reportbug_ui_newt.py
  2. 7
      reportbug_ui_urwid.py

11
reportbug_ui_newt.py

@ -1,6 +1,6 @@
# Newt user interface for reportbug
# Written by Chris Lawrence <lawrencc@debian.org>
# (C) 2001-04 Chris Lawrence
# (C) 2001-06 Chris Lawrence
#
# This program is freely distributable per the following license:
#
@ -18,12 +18,17 @@
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
#
# $Id: reportbug_ui_newt.py,v 1.5.2.2 2006-08-22 16:28:56 lawrencc Exp $
# $Id: reportbug_ui_newt.py,v 1.5.2.3 2006-08-26 01:57:09 lawrencc Exp $
import commands, string, sys, snack, re, debianbts
import commands, string, sys, re, debianbts
from reportbug_exceptions import *
from urlutils import launch_browser
try:
import snack
except ImportError:
raise UINotImportable, 'Please install the python-newt package to use this interface.'
ISATTY = sys.stdin.isatty()
try:

7
reportbug_ui_urwid.py

@ -22,20 +22,19 @@
# (LGPL) Version 2.1 or later. On Debian systems, this license is available
# in /usr/share/common-licenses/LGPL
#
# $Id: reportbug_ui_urwid.py,v 1.3.2.9 2006-08-22 16:28:56 lawrencc Exp $
# $Id: reportbug_ui_urwid.py,v 1.3.2.10 2006-08-26 01:57:09 lawrencc Exp $
import commands, string, sys, re
from reportbug_exceptions import *
try:
import urwid.raw_display
import urwid
except ImportError:
print >> sys.stderr, 'Please install the python-urwid package to use this interface.'
sys.exit(1)
raise UINotImportable, 'Please install the python-urwid package to use this interface.'
import reportbug
from reportbug_exceptions import *
from urlutils import launch_browser
ISATTY = sys.stdin.isatty()

Loading…
Cancel
Save