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>
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 @@
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):