aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2015-07-13 14:52:15 -0400
committerDevan Franchini <twitch153@gentoo.org>2015-07-13 14:52:17 -0400
commit9128580881ba70dbd1bd08e4cdcd8731a46699cd (patch)
tree49d8219d11736cea81c5218bef06d5ebcdebfd2e /layman/overlays/overlay.py
parentjson_db/__init__.py: Modifies function descriptions (diff)
downloadlayman-9128580881ba70dbd1bd08e4cdcd8731a46699cd.tar.gz
layman-9128580881ba70dbd1bd08e4cdcd8731a46699cd.tar.bz2
layman-9128580881ba70dbd1bd08e4cdcd8731a46699cd.zip
overlay.py: Modifies error message for missing "name" entry
If the Overlay object has no name then trying to use the name would result in erroneous or illogical reporting.
Diffstat (limited to 'layman/overlays/overlay.py')
-rwxr-xr-xlayman/overlays/overlay.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py
index de0a035..024989c 100755
--- a/layman/overlays/overlay.py
+++ b/layman/overlays/overlay.py
@@ -157,8 +157,7 @@ class Overlay(object):
if _name != None:
self.name = encode(_name)
else:
- msg = 'Overlay from dict(), "%(name)s" is missing a "name" entry!'\
- % {'name': self.name}
+ msg = 'Overlay from_dict(), "name" entry missing from dictionary!'
raise Exception(msg)
_sources = overlay['source']
@@ -383,8 +382,7 @@ class Overlay(object):
elif 'name' in xml.attrib:
self.name = encode(xml.attrib['name'])
else:
- msg = 'Overlay from_xml(), "%(name)s" is missing a "name" entry!'\
- % {'name': self.name}
+ msg = 'Overlay from_xml(), "name" entry missing from xml!'
raise Exception(msg)
_sources = xml.findall('source')