summaryrefslogtreecommitdiffstats
path: root/layman/overlays/cvs.py
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2010-01-04 05:47:18 +0100
committerSebastian Pipping <sebastian@pipping.org>2010-01-04 05:51:42 +0100
commite54bec19b0a5e29df79b35d0f90574e22db538da (patch)
treed70bd3ef11897245e8e0359cf4f62004655fc93a /layman/overlays/cvs.py
parent21f0e3ccbe47993cb8851aa62aab4e015da74e39 (diff)
downloadlayman-e54bec19b0a5e29df79b35d0f90574e22db538da.tar.gz
layman-e54bec19b0a5e29df79b35d0f90574e22db538da.tar.bz2
layman-e54bec19b0a5e29df79b35d0f90574e22db538da.zip
Add reading of format/subpath/category from repositories.xml format
Diffstat (limited to 'layman/overlays/cvs.py')
-rw-r--r--layman/overlays/cvs.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/layman/overlays/cvs.py b/layman/overlays/cvs.py
index d2bf5d3..5c8d376 100644
--- a/layman/overlays/cvs.py
+++ b/layman/overlays/cvs.py
@@ -26,7 +26,7 @@ __version__ = "$Id$"
import xml.etree.ElementTree as ET # Python 2.5
-from layman.utils import path
+from layman.utils import path, ensure_unicode
from layman.overlays.overlay import Overlay
#===============================================================================
@@ -45,8 +45,11 @@ class CvsOverlay(Overlay):
Overlay.__init__(self, xml, config, ignore, quiet)
- if 'subpath' in xml.attrib:
- self.subpath = xml.attrib['subpath']
+ _subpath = xml.find('subpath')
+ if _subpath != None:
+ self.subpath = ensure_unicode(_subpath.text.strip())
+ elif 'subpath' in xml.attrib:
+ self.subpath = ensure_unicode(xml.attrib['subpath'])
else:
self.subpath = ''