commit | ff0a7b8ca2c3666c7c863cc2c685c277bad05b6b | [log] [tgz] |
---|---|---|
author | Jack Jansen <jack.jansen@cwi.nl> | Fri Mar 15 13:47:32 2002 +0000 |
committer | Jack Jansen <jack.jansen@cwi.nl> | Fri Mar 15 13:47:32 2002 +0000 |
tree | 6f2011fdfc28d77cdd1ab879b10308fd0b5cf5bd | |
parent | 0c160a08f2228045437a94ea6e00306ace8dbfb4 [diff] [blame] |
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.
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 @@ 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())