Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8cd8a660
Commit
8cd8a660
authored
Sep 24, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix webbrowser.BackgroundBrowser on Windows.
(backport from rev. 51991)
parent
507d97d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
Lib/webbrowser.py
Lib/webbrowser.py
+11
-5
Misc/NEWS
Misc/NEWS
+10
-0
No files found.
Lib/webbrowser.py
View file @
8cd8a660
...
...
@@ -165,7 +165,10 @@ class GenericBrowser(BaseBrowser):
cmdline
=
[
self
.
name
]
+
[
arg
.
replace
(
"%s"
,
url
)
for
arg
in
self
.
args
]
try
:
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
)
if
sys
.
platform
[:
3
]
==
'win'
:
p
=
subprocess
.
Popen
(
cmdline
)
else
:
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
)
return
not
p
.
wait
()
except
OSError
:
return
False
...
...
@@ -178,11 +181,14 @@ class BackgroundBrowser(GenericBrowser):
def
open
(
self
,
url
,
new
=
0
,
autoraise
=
1
):
cmdline
=
[
self
.
name
]
+
[
arg
.
replace
(
"%s"
,
url
)
for
arg
in
self
.
args
]
setsid
=
getattr
(
os
,
'setsid'
,
None
)
if
not
setsid
:
setsid
=
getattr
(
os
,
'setpgrp'
,
None
)
try
:
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
,
preexec_fn
=
setsid
)
if
sys
.
platform
[:
3
]
==
'win'
:
p
=
subprocess
.
Popen
(
cmdline
)
else
:
setsid
=
getattr
(
os
,
'setsid'
,
None
)
if
not
setsid
:
setsid
=
getattr
(
os
,
'setpgrp'
,
None
)
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
,
preexec_fn
=
setsid
)
return
(
p
.
poll
()
is
None
)
except
OSError
:
return
False
...
...
Misc/NEWS
View file @
8cd8a660
...
...
@@ -14,12 +14,21 @@ Core and builtins
- Allow exception instances to be directly sliced again.
Extension Modules
-----------------
- Fix itertools.count(n) to work with negative numbers again.
Library
-------
- Make webbrowser.BackgroundBrowser usable in Windows (it wasn'
t
because
the
close_fds
arg
to
subprocess
.
Popen
is
not
supported
).
What
's New in Python 2.5 (final)
================================
...
...
@@ -27,6 +36,7 @@ What's New in Python 2.5 (final)
No changes since release candidate 2.
What'
s
New
in
Python
2.5
release
candidate
2
?
=============================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment