summaryrefslogtreecommitdiff
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-06-09 20:43:48 +0000
committerGeorg Brandl <georg@python.org>2006-06-09 20:43:48 +0000
commit0e3e7b6645ee922c4d2d922513d4e63ef65cafd8 (patch)
tree8a4f18f98f8637f58ce14f5cfd3fc8e9e676f5b4 /Lib/webbrowser.py
parent63326bf54f9c578ff6b04f0078808dc585fa03b8 (diff)
downloadcpython-0e3e7b6645ee922c4d2d922513d4e63ef65cafd8.tar.gz
Make use of new str.startswith/endswith semantics.
Occurences in email and compiler were ignored due to backwards compat requirements.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r--Lib/webbrowser.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 4693fe7568..bae0caf4a0 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -98,8 +98,7 @@ def _synthesize(browser, update_tryorder=1):
if sys.platform[:3] == "win":
def _isexecutable(cmd):
cmd = cmd.lower()
- if os.path.isfile(cmd) and (cmd.endswith(".exe") or
- cmd.endswith(".bat")):
+ if os.path.isfile(cmd) and cmd.endswith((".exe", ".bat")):
return True
for ext in ".exe", ".bat":
if os.path.isfile(cmd + ext):