]> granicus.if.org Git - python/commitdiff
Issue #2666: Handle BROWSER environment variable properly for unknown browser names...
authorGeorg Brandl <georg@python.org>
Fri, 4 Sep 2009 06:59:20 +0000 (06:59 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 4 Sep 2009 06:59:20 +0000 (06:59 +0000)
Lib/webbrowser.py
Misc/NEWS

index bfd353a467c5723595dc5b15e065fd4bab947554..74f02701228662be1eb343662308b6c8af88c804 100644 (file)
@@ -625,7 +625,9 @@ if "BROWSER" in os.environ:
     # and prepend to _tryorder
     for cmdline in _userchoices:
         if cmdline != '':
-            _synthesize(cmdline, -1)
+            cmd = _synthesize(cmdline, -1)
+            if cmd[1] is None:
+                register(cmdline, None, GenericBrowser(cmdline), -1)
     cmdline = None # to make del work if _userchoices was empty
     del cmdline
     del _userchoices
index f98706c0a72579d79b5d1142755c71fa08796347..eea32c1a901847f11dd1f37ff2e4fbb4f7820021 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -364,6 +364,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #2666: Handle BROWSER environment variable properly for unknown browser
+  names in the webbrowser module.
+
 - Issue #6054: Do not normalize stored pathnames in tarfile.
 
 - Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN