[PATCH 3/6] Clean up imports
John Wright
jsw at debian.org
Wed Jul 29 13:35:29 UTC 2009
From: John Wright <john at johnwright.org>
Some modules were imported later in the script rather than at the top,
and the "new" module was never used.
---
debian_bundle/deb822.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/debian_bundle/deb822.py b/debian_bundle/deb822.py
index 2738b64..f4f3942 100644
--- a/debian_bundle/deb822.py
+++ b/debian_bundle/deb822.py
@@ -30,12 +30,13 @@ try:
except ImportError:
_have_apt_pkg = False
-import new
+import os
import re
import string
import sys
import StringIO
import UserDict
+import subprocess
class OrderedSet(object):
"""A set-like object that preserves order when iterating over it
@@ -586,14 +587,12 @@ class GpgInfo(dict):
args = executable
#args.extend(["--status-fd", "1", "--no-default-keyring"])
args.extend(["--status-fd", "1"])
- import os
[args.extend(["--keyring", k]) for k in keyrings
if os.path.isfile(k) and os.access(k, os.R_OK)]
if "--keyring" not in args:
raise IOError, "cannot access none of given keyrings"
- import subprocess
p = subprocess.Popen(args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# XXX what to do with exit code?
--
1.6.3.3
More information about the pkg-python-debian-discuss
mailing list