Michal 2018-09-17 14:40:03 +02:00 committed by Jehan
parent 09d1a3c82f
commit 82e59a951d
2 changed files with 2 additions and 8 deletions

View file

@ -19,12 +19,9 @@ def makearchive (dest, manifest, root):
def parse_packagedb (packagedb_loc):
"""Parses a jhbuild packagedb.xml file"""
packages = []
tree = ElementTree.parse (packagedb_loc)
root = tree.getroot ()
for child in root:
packages.append (child.attrib)
packages = [child.attrib for child in root]
return packages

View file

@ -94,10 +94,7 @@ def colorxhtml(img, drawable, filename, raw_filename,
chars = chars.translate(allchars, badchars)
data = []
for c in chars:
data.append(escape_table.get(c, c))
data = [escape_table.get(c, c) for c in chars]
if data:
data.reverse()