summaryrefslogtreecommitdiffstats
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-03-15 13:47:32 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-03-15 13:47:32 (GMT)
commitff0a7b8ca2c3666c7c863cc2c685c277bad05b6b (patch)
tree6f2011fdfc28d77cdd1ab879b10308fd0b5cf5bd /Lib/webbrowser.py
parent0c160a08f2228045437a94ea6e00306ace8dbfb4 (diff)
downloadcpython-ff0a7b8ca2c3666c7c863cc2c685c277bad05b6b.zip
cpython-ff0a7b8ca2c3666c7c863cc2c685c277bad05b6b.tar.gz
cpython-ff0a7b8ca2c3666c7c863cc2c685c277bad05b6b.tar.bz2
If no webbrowsers were found _tryorder would be empty, cmd would never be set and the "del cmd" would fail. Fixed.
2.2.1 candidate.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r--Lib/webbrowser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 67b086e..19443ca 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -322,6 +322,7 @@ for cmd in _tryorder:
if _iscommand(cmd.lower()):
register(cmd.lower(), None, GenericBrowser(
"%s '%%s'" % cmd.lower()))
+cmd = None # to make del work if _tryorder was empty
del cmd
_tryorder = filter(lambda x: _browsers.has_key(x.lower())