summaryrefslogtreecommitdiff
path: root/morphlib/localrepocache.py
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2015-03-17 11:09:44 +0000
committerGerrit Code Review <gerrit@baserock.org>2015-03-17 11:09:44 +0000
commitcd7fa4119a3850541566b7d20d69515256e0b310 (patch)
treeb8986b02d566f125a59ae2b3b610ead7d3f87e37 /morphlib/localrepocache.py
parent60aedc8d97679159678e7ebad2f2d81768e9736a (diff)
parentaab6f2b5d3621d5760145d133a72495ef2ac1f25 (diff)
downloadmorph-cd7fa4119a3850541566b7d20d69515256e0b310.tar.gz
Merge "Use python3 compatible notation for catching exceptions"
Diffstat (limited to 'morphlib/localrepocache.py')
-rw-r--r--morphlib/localrepocache.py6
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):