]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #4537: webbrowser.UnixBrowser failed because this module defines an open()
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Fri, 5 Dec 2008 01:02:21 +0000 (01:02 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Fri, 5 Dec 2008 01:02:21 +0000 (01:02 +0000)
function which shadows the builtin.

Will backport to 3.0

Lib/webbrowser.py
Misc/NEWS

index 4772adc6c05d4c850dd508bc43afdcb13a0a707f..18dc11b191bdb73c2a54a2929bf4c40465d9a1b8 100644 (file)
@@ -223,7 +223,7 @@ class UnixBrowser(BaseBrowser):
         cmdline = [self.name] + raise_opt + args
 
         if remote or self.background:
-            inout = open(os.devnull, "r+")
+            inout = io.open(os.devnull, "r+")
         else:
             # for TTY browsers, we need stdin/out
             inout = None
index d4e749f58c0000785b6a595e1e96e6ca3ae1608c..15e3401c59716b450be2d53b2d642d437ea65612 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #4537: webbrowser.UnixBrowser would fail to open the browser because
+  it was calling the wrong open() function.
+
 - Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to
   support unusual filenames (such as those containing semi-colons) in
   Content-Disposition headers.