diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-20 10:57:44 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-20 10:57:44 +0000 |
commit | 7cb8fb941f09d1ac646be334745f90e16ebd46eb (patch) | |
tree | bad100ba3461c881ebd388d29a6ac859a8962a1a /pym/portage/cache/flat_list.py | |
parent | e70e41916899163fb28a1f5fa24c0ee2b17707f7 (diff) | |
download | portage-7cb8fb941f09d1ac646be334745f90e16ebd46eb.tar.gz portage-7cb8fb941f09d1ac646be334745f90e16ebd46eb.tar.bz2 portage-7cb8fb941f09d1ac646be334745f90e16ebd46eb.zip |
Update syntax of 'except' statements for compatibility with Python 3.
(2to3-3.1 -f except -nw ${FILES})
svn path=/main/trunk/; revision=14289
Diffstat (limited to 'pym/portage/cache/flat_list.py')
-rw-r--r-- | pym/portage/cache/flat_list.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pym/portage/cache/flat_list.py b/pym/portage/cache/flat_list.py index 1d4dbd28f..cfa3340cd 100644 --- a/pym/portage/cache/flat_list.py +++ b/pym/portage/cache/flat_list.py @@ -38,14 +38,14 @@ class database(fs_template.FsBased): errors='replace') for k,v in zip(self.auxdbkey_order, myf): d[k] = v.rstrip("\n") - except (OSError, IOError),e: + except (OSError, IOError) as e: if errno.ENOENT == e.errno: raise KeyError(cpv) raise cache_errors.CacheCorruption(cpv, e) try: d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime) - except OSError, e: + except OSError as e: myf.close() raise cache_errors.CacheCorruption(cpv, e) myf.close() @@ -60,7 +60,7 @@ class database(fs_template.FsBased): encoding=_encodings['fs'], errors='strict'), mode='w', encoding=_encodings['repo.content'], errors='backslashreplace') - except (OSError, IOError), e: + except (OSError, IOError) as e: if errno.ENOENT == e.errno: try: self._ensure_dirs(cpv) @@ -68,7 +68,7 @@ class database(fs_template.FsBased): encoding=_encodings['fs'], errors='strict'), mode='w', encoding=_encodings['repo.content'], errors='backslashreplace') - except (OSError, IOError),e: + except (OSError, IOError) as e: raise cache_errors.CacheCorruption(cpv, e) else: raise cache_errors.CacheCorruption(cpv, e) @@ -83,7 +83,7 @@ class database(fs_template.FsBased): new_fp = os.path.join(self._base,cpv) try: os.rename(fp, new_fp) - except (OSError, IOError), e: + except (OSError, IOError) as e: os.remove(fp) raise cache_errors.CacheCorruption(cpv, e) @@ -91,7 +91,7 @@ class database(fs_template.FsBased): def _delitem(self, cpv): try: os.remove(os.path.join(self._base,cpv)) - except OSError, e: + except OSError as e: if errno.ENOENT == e.errno: raise KeyError(cpv) else: |