From 8b570c96bd9fe04621e812f2974be831f6cc60b7 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 9 May 2012 16:02:41 +0100 Subject: Fix CachedRepo exceptions to initialize correctly --- morphlib/cachedrepo.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'morphlib/cachedrepo.py') diff --git a/morphlib/cachedrepo.py b/morphlib/cachedrepo.py index 7d2bae4b..4c651130 100644 --- a/morphlib/cachedrepo.py +++ b/morphlib/cachedrepo.py @@ -24,37 +24,39 @@ import morphlib.execute class InvalidReferenceError(cliapp.AppException): def __init__(self, repo, ref): - Exception.__init__(self, 'Ref %s is an invalid reference for repo %s' % - (ref, repo)) + cliapp.AppException.__init__( + self, 'Ref %s is an invalid reference for repo %s' % (ref, repo)) class UnresolvedNamedReferenceError(cliapp.AppException): def __init__(self, repo, ref): - Exception.__init__(self, 'Ref %s is not a SHA1 ref for repo %s' % - (ref, repo)) + cliapp.AppException.__init__( + self, 'Ref %s is not a SHA1 ref for repo %s' % (ref, repo)) class CheckoutDirectoryExistsError(cliapp.AppException): def __init__(self, repo, target_dir): - Exception.__init__( - self, 'Checkout directory %s for repo %s already exists' % + cliapp.AppException.__init__( + self, + 'Checkout directory %s for repo %s already exists' % (target_dir, repo)) class CheckoutError(cliapp.AppException): def __init__(self, repo, ref, target_dir): - Exception.__init__(self, 'Failed to check out %s:%s into %s' % - (repo, ref, target_dir)) + cliapp.AppException.__init__( + self, + 'Failed to check out %s:%s into %s' % (repo, ref, target_dir)) class UpdateError(cliapp.AppException): def __init__(self, repo): - Exception.__init__(self, 'Failed to update cached version of repo %s' % - repo) + cliapp.AppException.__init__( + self, 'Failed to update cached version of repo %s' % repo) class CachedRepo(object): -- cgit v1.2.1