summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwrite-repositories-xml.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/write-repositories-xml.py b/write-repositories-xml.py
index 61cc7a0..1bbfd9c 100755
--- a/write-repositories-xml.py
+++ b/write-repositories-xml.py
@@ -43,6 +43,9 @@ def append_feed(feed_uri, overlay_object):
feed.text = feed_uri
overlay_object.append(feed)
+def strip(node):
+ node.text = node.text.strip()
+
a = ET.parse(open(layman_global_txt_location))
overlays = a.getroot()
@@ -50,10 +53,11 @@ for overlay in overlays:
repo_name = overlay.attrib['name']
extra_data = TRANSITION_DATA_EXTRA.get(repo_name, {})
- # Move 'description' tag
+ # Move (and strip) 'description' tag
description = overlay.find('description')
overlay.remove(description)
overlay.insert(0, description)
+ strip(description)
# Transform 'overlay' tag
overlay.tag = 'repo'
@@ -66,6 +70,7 @@ for overlay in overlays:
link = overlay.find('link')
if link != None:
link.tag = 'homepage'
+ strip(link)
# Transform 'contact' attribute
owner = ET.Element('owner')