summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/migrate-0.8.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/migrate-0.8.py b/utils/migrate-0.8.py
index 49596fc4..9f7790f7 100755
--- a/utils/migrate-0.8.py
+++ b/utils/migrate-0.8.py
@@ -193,7 +193,10 @@ def find_deprecated_py():
def find_occurences(all_old, files):
"""Find all ocurrences in the given Python files."""
for fname in files:
- if fname.endswith('setup3.py') or not fname.endswith('.py'):
+ if not os.path.exists(fname):
+ continue
+ if not (fname in sys.argv or fname.endswith('.py') or
+ re.match('^#.*python.*', open(fname).readline())):
continue
words = defaultdict(lambda: set())