From b3c281c1c5060f4d28e83680dbbc3f2819f0bd42 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 18 Feb 2010 05:42:00 +0100 Subject: Move safe op out of try-except block, extend code doc --- layman/dbbase.py | 5 +++-- 1 file 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): -- cgit v1.2.3-1-g7c22