[PATCH 5/6] Rewrite a clever chunk of code to be understandable
John Wright
jsw at debian.org
Wed Jul 29 13:35:31 UTC 2009
From: John Wright <john at johnwright.org>
Replace a list comprehension whose actual results we threw away, but on
whose side-effects we depended, with a clearer for loop.
---
debian_bundle/deb822.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/debian_bundle/deb822.py b/debian_bundle/deb822.py
index cf4fc48..3fffa4a 100644
--- a/debian_bundle/deb822.py
+++ b/debian_bundle/deb822.py
@@ -586,8 +586,9 @@ class GpgInfo(dict):
args = executable
#args.extend(["--status-fd", "1", "--no-default-keyring"])
args.extend(["--status-fd", "1"])
- [args.extend(["--keyring", k]) for k in keyrings
- if os.path.isfile(k) and os.access(k, os.R_OK)]
+ for k in keyrings:
+ if os.path.isfile(k) and os.access(k, os.R_OK):
+ args.extend(["--keyring", k])
if "--keyring" not in args:
raise IOError, "cannot access none of given keyrings"
--
1.6.3.3
More information about the pkg-python-debian-discuss
mailing list