[Python-bugs-list] [ python-Bugs-495695 ] webbrowser.py: selection of browser
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 20 Dec 2001 16:56:47 -0800
Bugs item #495695, was opened at 2001-12-20 16:56
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=495695&group_id=5470
Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthias Klose (doko)
Assigned to: Nobody/Anonymous (nobody)
Summary: webbrowser.py: selection of browser
Initial Comment:
[please CC 121737@bugs.debian.org on replies; complete
report can be found at http://bugs.debian.org/121737 ]
webbrowser.py tries hard to select correct browsers
and then wastes it
The culprit is the last loop, registering everything
possible.
I'm not sure, but wasn't it supposed to run only in
the environ["BROWSER"]
case like this?:
-----diff start-----
--- /usr/lib/python2.1/webbrowser.py Sun Nov 11
18:23:54 2001
+++ /tmp/webbrowser.py Thu Nov 29 17:40:46 2001
@@ -305,11 +305,10 @@
# It's the user's responsibility to register
handlers for any unknown
# browser referenced by this value, before
calling open().
_tryorder = os.environ["BROWSER"].split(":")
-
-for cmd in _tryorder:
- if not _browsers.has_key(cmd.lower()):
- if _iscommand(cmd.lower()):
- register(cmd.lower(), None, GenericBrowser
("%s %%s" % cmd.lower()))
+ for cmd in _tryorder:
+ if not _browsers.has_key(cmd.lower()):
+ if _iscommand(cmd.lower()):
+ register(cmd.lower(), None,
GenericBrowser("%s %%s" % cmd.lower()))
_tryorder = filter(lambda x: _browsers.has_key(x.lower
())
or x.find("%s") > -1, _tryorder)
-----diff end-----
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=495695&group_id=5470