diff options
-rw-r--r-- | overlord/dbbase.py | 8 | ||||
-rw-r--r-- | overlord/overlays/overlay.py | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/overlord/dbbase.py b/overlord/dbbase.py index 7821aea..e152578 100644 --- a/overlord/dbbase.py +++ b/overlord/dbbase.py @@ -41,10 +41,12 @@ from overlord.overlays.overlay import Overlay # Class UnknownOverlayException # #------------------------------------------------------------------------------- +def UnknownOverlayMessage(ovl): + return 'Overlay "%s" does not exist.' % ovl class UnknownOverlayException(Exception): def __init__(self, repo_name): - message = 'Overlay "%s" does not exist.' % repo_name + UnknownOverlayMessage(repo_name) super(UnknownOverlayException, self).__init__(message) #=============================================================================== @@ -242,8 +244,8 @@ class DbBase: for overlay in selection: if verbose: - result.append((str(overlay), overlay.is_supported(), - overlay.is_official())) + result.append(overlay.get_infostr(), overlay.is_supported(), + overlay.is_official()) else: result.append((overlay.short_list(width), overlay.is_supported(), overlay.is_official())) diff --git a/overlord/overlays/overlay.py b/overlord/overlays/overlay.py index e8730f9..b827fd8 100644 --- a/overlord/overlays/overlay.py +++ b/overlord/overlays/overlay.py @@ -305,7 +305,7 @@ class Overlay(object): assert len(self.sources) == 1 return self.sources[0].delete(base) - def __str__(self): + def get_infostr(self): ''' >>> here = os.path.dirname(os.path.realpath(__file__)) >>> import xml.etree.ElementTree as ET # Python 2.5 |