diff options
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rwxr-xr-x | utils/migrate-0.8.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 69eecc2b..a8211c5f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ python-apt (0.7.94.3) UNRELEASED; urgency=low - Map ArchiveURI property to archive_uri * debian/control: - Change priority to standard, keep -doc and -dev on optional. + * utils/migrate-0.8.py: + - Open files in universal newline support and pass filename to ast.parse. [ Michael Vogt ] * apt/cache.py: 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: |
