Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb33165

Browse files
committed
_tryorder should always be a list, then the problem Jack had to fix in
1.24 wouldn't have occurred in the first place. Remove a debug print command accidentally inserted by Martin in 1.23.
1 parent cdbbd0a commit cb33165

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Lib/webbrowser.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def _remote(self, action, autoraise):
116116
cmd = "%s %s -remote '%s' >/dev/null 2>&1" % (self.name,
117117
raise_opt,
118118
action)
119-
print cmd
120119
rc = os.system(cmd)
121120
if rc:
122121
import time
@@ -233,7 +232,7 @@ def open_new(self, url):
233232
# the TERM and DISPLAY cases, because we might be running Python from inside
234233
# an xterm.
235234
if os.environ.get("TERM") or os.environ.get("DISPLAY"):
236-
_tryorder = ("mozilla","netscape","kfm","grail","links","lynx","w3m")
235+
_tryorder = ["mozilla","netscape","kfm","grail","links","lynx","w3m"]
237236

238237
# Easy cases first -- register console browsers if we have them.
239238
if os.environ.get("TERM"):
@@ -282,7 +281,7 @@ def open_new(self, url):
282281
#
283282

284283
if sys.platform[:3] == "win":
285-
_tryorder = ("netscape", "windows-default")
284+
_tryorder = ["netscape", "windows-default"]
286285
register("windows-default", WindowsDefault)
287286

288287
#
@@ -296,15 +295,15 @@ def open_new(self, url):
296295
else:
297296
# internet-config is the only supported controller on MacOS,
298297
# so don't mess with the default!
299-
_tryorder = ("internet-config", )
298+
_tryorder = ["internet-config"]
300299
register("internet-config", InternetConfig)
301300

302301
#
303302
# Platform support for OS/2
304303
#
305304

306305
if sys.platform[:3] == "os2" and _iscommand("netscape.exe"):
307-
_tryorder = ("os2netscape",)
306+
_tryorder = ["os2netscape"]
308307
register("os2netscape", None,
309308
GenericBrowser("start netscape.exe %s"))
310309

0 commit comments

Comments
 (0)