diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-03-29 17:15:33 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-03-29 17:15:33 +0200 |
| commit | 72c3745b28d64d43f6c21f960e13f0ee6142ec8d (patch) | |
| tree | 3f8b7901985c8b9e5785afb0fa6dbae397a33708 /utils/migrate-0.8.py | |
| parent | 33851a84b6868eaff1fadaa5b5f57aa696cdc2e8 (diff) | |
| download | python-apt-72c3745b28d64d43f6c21f960e13f0ee6142ec8d.tar.gz | |
utils/migrate-0.8.py: Open files in universal newline support and pass filename to ast.parse.
Diffstat (limited to 'utils/migrate-0.8.py')
| -rwxr-xr-x | utils/migrate-0.8.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/migrate-0.8.py b/utils/migrate-0.8.py index d0d8e9a1..56d51ef9 100755 --- a/utils/migrate-0.8.py +++ b/utils/migrate-0.8.py @@ -197,7 +197,7 @@ def find_occurences(all_old, files): continue words = defaultdict(lambda: set()) - for i in ast.walk(ast.parse(open(fname).read())): + for i in ast.walk(ast.parse(open(fname, "rU").read(), fname)): if isinstance(i, _ast.ImportFrom): for alias in i.names: if alias.name in all_old: |
