summaryrefslogtreecommitdiff
path: root/morphlib/remoterepocache.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/remoterepocache.py')
-rw-r--r--morphlib/remoterepocache.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/morphlib/remoterepocache.py b/morphlib/remoterepocache.py
index 5c2017de..ba4937d7 100644
--- a/morphlib/remoterepocache.py
+++ b/morphlib/remoterepocache.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 Codethink Limited
+# Copyright (C) 2012-2013 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -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