diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-10-11 13:56:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-11 13:56:49 (GMT) |
commit | 73665b41470532f873315d5ae39906160192320d (patch) | |
tree | ac1ca7f06f47d3518d5c4eaa6d13a3c8b2149e45 /Tools/scripts/pathfix.py | |
parent | 380eb427ddd067042539d5d5f2b7f88a7183801c (diff) | |
download | cpython-73665b41470532f873315d5ae39906160192320d.zip cpython-73665b41470532f873315d5ae39906160192320d.tar.gz cpython-73665b41470532f873315d5ae39906160192320d.tar.bz2 |
bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536)
pathfix.py: Assume all files that end on '.py' are Python scripts when working recursively.
(cherry picked from commit 2b7dc40b2af6578181808ba73c1533fc114e55df)
Co-authored-by: Ruediger Pluem <r.pluem@gmx.de>
Diffstat (limited to 'Tools/scripts/pathfix.py')
-rwxr-xr-x | Tools/scripts/pathfix.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Tools/scripts/pathfix.py b/Tools/scripts/pathfix.py index 237a3d9..d252321 100755 --- a/Tools/scripts/pathfix.py +++ b/Tools/scripts/pathfix.py @@ -89,11 +89,8 @@ def main(): sys.exit(bad) -ispythonprog = re.compile(r'^[a-zA-Z0-9_]+\.py$') - - def ispython(name): - return bool(ispythonprog.match(name)) + return name.endswith('.py') def recursedown(dirname): |