aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2010-02-18 05:42:00 +0100
committerSebastian Pipping <sebastian@pipping.org>2010-02-18 05:42:00 +0100
commitb3c281c1c5060f4d28e83680dbbc3f2819f0bd42 (patch)
tree0ce9dca24be6096b176e3c2ff878ae91e515c5c3
parentNo longer read same XML file twice (diff)
downloadoverlord-b3c281c1c5060f4d28e83680dbbc3f2819f0bd42.tar.gz
overlord-b3c281c1c5060f4d28e83680dbbc3f2819f0bd42.tar.bz2
overlord-b3c281c1c5060f4d28e83680dbbc3f2819f0bd42.zip
Move safe op out of try-except block, extend code doc
-rw-r--r--layman/dbbase.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/layman/dbbase.py b/layman/dbbase.py
index a7c4154..d8aa401 100644
--- a/layman/dbbase.py
+++ b/layman/dbbase.py
@@ -94,7 +94,7 @@ class DbBase:
def read(self, text):
'''
- Read an xml list of overlays.
+ Read an xml list of overlays (adding to and potentially overwriting existing entries)
>>> here = os.path.dirname(os.path.realpath(__file__))
>>> config = {'svn_command': '/usr/bin/svn', 'rsync_command':'/usr/bin/rsync'}
@@ -113,9 +113,10 @@ class DbBase:
OUT.debug('Parsing overlay entry', 8)
try:
ovl = Overlay(overlay, self.config, self.ignore, self.quiet)
- self.overlays[ovl.name] = ovl
except Exception, error:
OUT.warn(str(error), 3)
+ else:
+ self.overlays[ovl.name] = ovl
def write(self, path):