From bf2f52698d2fae3a1cb642d5ba300860e1487449 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Mon, 10 Mar 2014 23:27:54 +0100 Subject: xpi-repack: Replace built-in functions by list comprehensions. --- xpi-repack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpi-repack b/xpi-repack index e7408c7..2f7fea5 100755 --- a/xpi-repack +++ b/xpi-repack @@ -71,8 +71,8 @@ def get_source_package_name(script_name): "source package or provide a source package name.\n") sys.exit(1) lines = open("debian/control").readlines() - package_lines = filter(lambda x: x.find("Source:") >= 0, lines) - packages = map(lambda x: x[x.find(":")+1:].strip(), package_lines) + package_lines = [x for x in lines if x.find("Source:") >= 0] + packages = [x[x.find(":")+1:].strip() for x in package_lines] return packages[0] -- cgit v1.2.3