summaryrefslogtreecommitdiffstats
path: root/site_scons/site_tools/gather_inputs.py
diff options
context:
space:
mode:
Diffstat (limited to 'site_scons/site_tools/gather_inputs.py')
-rw-r--r--site_scons/site_tools/gather_inputs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/site_scons/site_tools/gather_inputs.py b/site_scons/site_tools/gather_inputs.py
index f299fed..6964bee 100644
--- a/site_scons/site_tools/gather_inputs.py
+++ b/site_scons/site_tools/gather_inputs.py
@@ -91,13 +91,14 @@ def GatherInputs(env, target, groups=['.*'], exclude_pattern=None):
_FindSources(ptrns, lst, all)
return
+ # Get real file (backed by repositories).
+ rfile = tgt.rfile()
+ rfile_is_file = rfile.isfile()
# See who it matches
for pattern, lst in ptrns.items():
- # Get real file (backed by repositories).
- rfile = tgt.rfile()
# Add files to the list for the first pattern that matches (implicitly,
# don't add directories).
- if rfile.isfile() and pattern.match(rfile.path):
+ if rfile_is_file and pattern.match(rfile.path):
lst.append(rfile.abspath)
break