diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-06-03 14:40:47 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-06-03 14:51:22 +0000 |
commit | af8acd80ca4326d82266f5d8fa2eca0cca1e1fbc (patch) | |
tree | cb0c67544d040219942ca7d794d8e60fbfca5f93 | |
parent | 64263de0123f9e513a300fd179e5b84384fa5343 (diff) | |
download | morph-af8acd80ca4326d82266f5d8fa2eca0cca1e1fbc.tar.gz |
Make all remote artifact cache get errors inherit from GetError
This saves from having to catch three separate exceptions.
-rw-r--r-- | morphlib/remoteartifactcache.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/morphlib/remoteartifactcache.py b/morphlib/remoteartifactcache.py index 9f6bf69e..3fe0f444 100644 --- a/morphlib/remoteartifactcache.py +++ b/morphlib/remoteartifactcache.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 @@ -36,7 +36,7 @@ class GetError(cliapp.AppException): (artifact, artifact.cache_key, cache)) -class GetArtifactMetadataError(cliapp.AppException): +class GetArtifactMetadataError(GetError): def __init__(self, cache, artifact, name): cliapp.AppException.__init__( @@ -44,7 +44,7 @@ class GetArtifactMetadataError(cliapp.AppException): 'from the artifact cache %s' % (name, artifact, cache)) -class GetSourceMetadataError(cliapp.AppException): +class GetSourceMetadataError(GetError): def __init__(self, cache, source, cache_key, name): cliapp.AppException.__init__( |