diff options
-rw-r--r-- | layman/overlay.py | 8 | ||||
-rw-r--r-- | layman/overlays/overlay.py | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/layman/overlay.py b/layman/overlay.py index ce0e3b1..f44c250 100644 --- a/layman/overlay.py +++ b/layman/overlay.py @@ -90,8 +90,8 @@ class Overlays: >>> a.overlays.keys() [u'wrobel', u'wrobel-stable'] - >>> a.overlays['wrobel-stable'].src - u'rsync://gunnarwrobel.de/wrobel-stable' + >>> list(a.overlays['wrobel-stable'].source_uris()) + [u'rsync://gunnarwrobel.de/wrobel-stable'] ''' document = ET.fromstring(text) overlays = document.findall('overlay') + \ @@ -146,8 +146,8 @@ class Overlays: >>> here = os.path.dirname(os.path.realpath(__file__)) >>> config = {'svn_command': '/usr/bin/svn', 'rsync_command':'/usr/bin/rsync'} >>> a = Overlays([here + '/tests/testfiles/global-overlays.xml', ], config) - >>> a.select('wrobel-stable').src - u'rsync://gunnarwrobel.de/wrobel-stable' + >>> list(a.select('wrobel-stable').source_uris()) + [u'rsync://gunnarwrobel.de/wrobel-stable'] ''' if overlay in self.overlays.keys(): return self.overlays[overlay] diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py index 9965fdd..0f421d1 100644 --- a/layman/overlays/overlay.py +++ b/layman/overlays/overlay.py @@ -83,8 +83,8 @@ class Overlay(object): u'wrobel' >>> a.is_official() True - >>> a.src - u'https://overlays.gentoo.org/svn/dev/wrobel' + >>> list(a.source_uris()) + [u'https://overlays.gentoo.org/svn/dev/wrobel'] >>> a.owner_email u'nobody@gentoo.org' >>> a.description @@ -392,6 +392,10 @@ class Overlay(object): def is_supported(self): return any(e.is_supported() for e in self.sources) + def source_uris(self): + for i in self.sources: + yield i.src + #================================================================================ # # Testing |