summaryrefslogtreecommitdiff
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-03-15 13:47:32 +0000
committerJack Jansen <jack.jansen@cwi.nl>2002-03-15 13:47:32 +0000
commit506915f0ce3466769d98899be28fd05614f76b7d (patch)
tree1f511bedcab4e4922b4ea39a37b6ce0abd35827e /Lib/webbrowser.py
parent7c2dfc3551865cd7081dc9158abb0a5dedcd9f2e (diff)
downloadcpython-506915f0ce3466769d98899be28fd05614f76b7d.tar.gz
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 67b086ed3a..19443ca1e5 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())