diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-08-26 12:53:33 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-08-26 12:53:33 +0000 |
commit | 8c9aea626d1308a876d145d379ac5f23905fa9b4 (patch) | |
tree | ff15a510e42ca90d42d9c3f07897024262df4fe8 /morphlib/remoterepocache.py | |
parent | 32936bd5fa1d27260faa8074a80b64287fec90c7 (diff) | |
parent | e86a598553e96dab2dc4111aedefcb6b0a60c50d (diff) | |
download | morph-8c9aea626d1308a876d145d379ac5f23905fa9b4.tar.gz |
Merge remote-tracking branch 'origin/baserock/richardmaw/bugfix/http-fail'
Reviewed-by: Francisco Redondo Marchena
Reviewed-by: Sam Thursfield
Diffstat (limited to 'morphlib/remoterepocache.py')
-rw-r--r-- | morphlib/remoterepocache.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/morphlib/remoterepocache.py b/morphlib/remoterepocache.py index b1544b03..004ba86e 100644 --- a/morphlib/remoterepocache.py +++ b/morphlib/remoterepocache.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -63,9 +63,11 @@ class RemoteRepoCache(object): repo_url = self._resolver.pull_url(repo_name) try: return self._cat_file_for_repo_url(repo_url, ref, filename) - except BaseException, e: + except urllib2.HTTPError as e: logging.error('Caught exception: %s' % str(e)) - raise CatFileError(repo_name, ref, filename) + if e.code == 404: + raise CatFileError(repo_name, ref, filename) + raise # pragma: no cover def ls_tree(self, repo_name, ref): repo_url = self._resolver.pull_url(repo_name) |