From af8acd80ca4326d82266f5d8fa2eca0cca1e1fbc Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 3 Jun 2014 14:40:47 +0000 Subject: Make all remote artifact cache get errors inherit from GetError This saves from having to catch three separate exceptions. --- morphlib/remoteartifactcache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'morphlib') 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__( -- cgit v1.2.1