[jhbuild] systeminstall: use list comprehension instead of map/lambda
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] systeminstall: use list comprehension instead of map/lambda
- Date: Thu, 16 Aug 2012 12:32:00 +0000 (UTC)
commit c2088e99002445d02448166dc966a701d6f3cf22
Author: Craig Keogh <cskeogh adam com au>
Date: Thu Aug 16 15:51:51 2012 +0930
systeminstall: use list comprehension instead of map/lambda
list comprehension is easier to read.
jhbuild/utils/systeminstall.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/utils/systeminstall.py b/jhbuild/utils/systeminstall.py
index 5de6c12..af8a2dd 100755
--- a/jhbuild/utils/systeminstall.py
+++ b/jhbuild/utils/systeminstall.py
@@ -172,7 +172,8 @@ class PKSystemInstall(SystemInstall):
pk_package_ids = set()
txn.connect_to_signal('Package', lambda info, pkid, summary: pk_package_ids.add(pkid))
- txn_tx.WhatProvides("arch;newest;~installed", "any", map(lambda x: 'pkgconfig(%s)' % (x, ), pkgconfig_ids))
+ txn_tx.WhatProvides("arch;newest;~installed", "any",
+ ['pkgconfig(%s)' % pkg for pkg in pkgconfig_ids])
loop.run()
del txn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]