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 | |
| 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.
| -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: |
