summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-11-14 16:12:19 +1000
committerteor <teor@torproject.org>2019-11-14 16:12:19 +1000
commit3b4a360ed0decaf7285c825cfab7712d6d5ebb37 (patch)
treed535d95d38504ed253d0014375a7161626fa9a32 /scripts
parentb2b61b0268f5ddac347b5487ea677a7202b95c50 (diff)
downloadtor-3b4a360ed0decaf7285c825cfab7712d6d5ebb37.tar.gz
tor-3b4a360ed0decaf7285c825cfab7712d6d5ebb37.zip
practracker: Don't read editor temp files, attempt 2
(Or any files that start with "." or "#".) Obviously correct changes to already-reviewed code.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/maint/practracker/util.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/maint/practracker/util.py b/scripts/maint/practracker/util.py
index c38e4c8dd0..db02a983f8 100644
--- a/scripts/maint/practracker/util.py
+++ b/scripts/maint/practracker/util.py
@@ -33,10 +33,13 @@ def get_tor_c_files(tor_topdir, include_dirs=None):
# We only care about .c and .h files
if not (filename.endswith(".c") or filename.endswith(".h")):
continue
+ if filename in EXCLUDE_FILES:
+ continue
# Avoid editor temporary files
- if filename.startswith("."):
+ bname = os.path.basename(filename)
+ if bname.startswith("."):
continue
- if filename in EXCLUDE_FILES:
+ if bname.startswith("#"):
continue
full_path = os.path.join(root,filename)