]> granicus.if.org Git - python/commitdiff
#Issue2835: Correct an infinite recursion in webbrowser.open(), when KDE Konqueror...
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Mon, 12 May 2008 14:41:00 +0000 (14:41 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Mon, 12 May 2008 14:41:00 +0000 (14:41 +0000)
Lib/webbrowser.py
Misc/NEWS

index a028df0cf6f6998340a50b38596e64b323a8764e..4772adc6c05d4c850dd508bc43afdcb13a0a707f 100644 (file)
@@ -347,7 +347,8 @@ class Konqueror(BaseBrowser):
         else:
             action = "openURL"
 
-        devnull = open(os.devnull, "r+")
+        import io
+        devnull = io.open(os.devnull, "r+")
         # if possible, put browser in separate process group, so
         # keyboard interrupts don't affect browser as well as Python
         setsid = getattr(os, 'setsid', None)
index e40844e726276cae147c5d0bf34c104ff724088c..3f0b4a935a61d36af15c1ee0f5c38364fe93b93f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,6 +25,8 @@ Extension Modules
 Library
 -------
 
+- Issue 2865: webbrowser.open() works again in a KDE environment.
+
 - The multifile module has been removed.
 
 - The SocketServer module has been renamed to socketserver.