summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-07-06 11:54:40 -0400
committerWilliam Deegan <bill@baddogconsulting.com>2017-07-06 11:54:40 -0400
commit3010c84879e38755f90e317904e0bfb98d49f99c (patch)
tree026763f81c0fb73d75d99d8175525c18a5d7ee7a
parent8daca75d27a1025194a58adf379ba9de4a592406 (diff)
downloadscons-3010c84879e38755f90e317904e0bfb98d49f99c.tar.gz
python micro optimization in faster than find
-rw-r--r--src/engine/SCons/PathList.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/SCons/PathList.py b/src/engine/SCons/PathList.py
index 77e30c40..76cbeab8 100644
--- a/src/engine/SCons/PathList.py
+++ b/src/engine/SCons/PathList.py
@@ -104,11 +104,11 @@ class _PathList(object):
pl = []
for p in pathlist:
try:
- index = p.find('$')
+ found = '$' in p
except (AttributeError, TypeError):
type = TYPE_OBJECT
else:
- if index == -1:
+ if not found:
type = TYPE_STRING_NO_SUBST
else:
type = TYPE_STRING_SUBST