summaryrefslogtreecommitdiffstats
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-06-09 20:43:48 (GMT)
committerGeorg Brandl <georg@python.org>2006-06-09 20:43:48 (GMT)
commitb2afe855e5d75a570707d6bf0e32206e4b7b1c4d (patch)
treeb637a7e78de40cf155c471e702e9b465fcd0625d /Lib/webbrowser.py
parent3ebef999e60cc63baafcdcfa0fd05c063715a66c (diff)
downloadcpython-b2afe855e5d75a570707d6bf0e32206e4b7b1c4d.zip
cpython-b2afe855e5d75a570707d6bf0e32206e4b7b1c4d.tar.gz
cpython-b2afe855e5d75a570707d6bf0e32206e4b7b1c4d.tar.bz2
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 4693fe7..bae0caf 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):