diff --git a/build/windows/jhbuild/makepkgs.py b/build/windows/jhbuild/makepkgs.py index ac794bf243..e0d2b4b1b5 100755 --- a/build/windows/jhbuild/makepkgs.py +++ b/build/windows/jhbuild/makepkgs.py @@ -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 diff --git a/plug-ins/pygimp/plug-ins/colorxhtml.py b/plug-ins/pygimp/plug-ins/colorxhtml.py index 011f8cae97..6bf74de81a 100755 --- a/plug-ins/pygimp/plug-ins/colorxhtml.py +++ b/plug-ins/pygimp/plug-ins/colorxhtml.py @@ -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()