summaryrefslogtreecommitdiff
path: root/morphlib/remoterepocache.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-05-28 16:28:28 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-05-28 16:28:28 +0000
commitd5d9b7253f968b67e9c9a3e6d260a6adf1dee8f9 (patch)
treeaa33f3b250505f2f55e870ea9a48337853fe3e86 /morphlib/remoterepocache.py
parent57d2fc906005e073ba942ce5b89fde3ec1eefece (diff)
parent6375554363c111fda70b7540c3c56a0e9cf1497b (diff)
downloadmorph-d5d9b7253f968b67e9c9a3e6d260a6adf1dee8f9.tar.gz
Merge branch 'liw/kill-bare-except'
Reviewed-by: Richard Maw I, Lars, note that we have an old version of CoverageTestRunner in Baserock. The new version hides the spurious logging messages.
Diffstat (limited to 'morphlib/remoterepocache.py')
-rw-r--r--morphlib/remoterepocache.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/morphlib/remoterepocache.py b/morphlib/remoterepocache.py
index 5c2017de..d6812120 100644
--- a/morphlib/remoterepocache.py
+++ b/morphlib/remoterepocache.py
@@ -16,6 +16,7 @@
import cliapp
import json
+import logging
import urllib2
import urlparse
@@ -53,14 +54,16 @@ class RemoteRepoCache(object):
repo_url = self._resolver.pull_url(repo_name)
try:
return self._resolve_ref_for_repo_url(repo_url, ref)
- except:
+ except BaseException, e:
+ logging.error('Caught exception: %s' % str(e))
raise ResolveRefError(repo_name, ref)
def cat_file(self, repo_name, ref, filename):
repo_url = self._resolver.pull_url(repo_name)
try:
return self._cat_file_for_repo_url(repo_url, ref, filename)
- except:
+ except BaseException, e:
+ logging.error('Caught exception: %s' % str(e))
raise CatFileError(repo_name, ref, filename)
def ls_tree(self, repo_name, ref):
@@ -68,7 +71,8 @@ class RemoteRepoCache(object):
try:
info = json.loads(self._ls_tree_for_repo_url(repo_url, ref))
return info['tree'].keys()
- except:
+ except BaseException, e:
+ logging.error('Caught exception: %s' % str(e))
raise LsTreeError(repo_name, ref)
def _resolve_ref_for_repo_url(self, repo_url, ref): # pragma: no cover