diff options
author | Javier Jardón <jjardon@gnome.org> | 2015-03-13 13:02:24 +0000 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2015-03-16 16:34:55 +0000 |
commit | aab6f2b5d3621d5760145d133a72495ef2ac1f25 (patch) | |
tree | 561f7ca9b2ce8fd78fbf425d7b7fc3b7e12adcd5 /morphlib/localrepocache.py | |
parent | db23e8e6406f98722d2d18bf61b8e85cd99415eb (diff) | |
download | morph-aab6f2b5d3621d5760145d133a72495ef2ac1f25.tar.gz |
Use python3 compatible notation for catching exceptions
Change-Id: Ibda7a938cd16e35517a531140f39ef4664d85c72
Diffstat (limited to 'morphlib/localrepocache.py')
-rw-r--r-- | morphlib/localrepocache.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/morphlib/localrepocache.py b/morphlib/localrepocache.py index af557b1a..4fc3916a 100644 --- a/morphlib/localrepocache.py +++ b/morphlib/localrepocache.py @@ -172,7 +172,7 @@ class LocalRepoCache(object): self._git(['config', 'remote.origin.mirror', 'true'], cwd=path) self._git(['config', 'remote.origin.fetch', '+refs/*:refs/*'], cwd=path) - except BaseException, e: # pragma: no cover + except BaseException as e: # pragma: no cover if self.fs.exists(path): self.fs.removedir(path, force=True) return False, 'Unable to extract tarball %s: %s' % ( @@ -192,7 +192,7 @@ class LocalRepoCache(object): try: return self.get_repo(reponame) - except NotCached, e: + except NotCached as e: pass repourl = self._resolver.pull_url(reponame) @@ -213,7 +213,7 @@ class LocalRepoCache(object): try: self._git(['clone', '--mirror', '-n', repourl, target], echo_stderr=self._app.settings['verbose']) - except cliapp.AppException, e: + except cliapp.AppException as e: errors.append('Unable to clone from %s to %s: %s' % (repourl, target, e)) if self.fs.exists(target): |