summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2010-01-20 20:58:10 +0000
committerRafael H. Schloming <rhs@apache.org>2010-01-20 20:58:10 +0000
commitaf3c5ad1d128870a9156eda0f8c469b9c6dd6912 (patch)
tree51a081cc44c85235a59706ae903c6e2c757e2123 /qpid/python
parent4b6d7560ebce653e6a65ff2296acff3bad4846cf (diff)
downloadqpid-python-af3c5ad1d128870a9156eda0f8c469b9c6dd6912.tar.gz
only import the subprocess module when needed
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@901378 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/tests/address.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/python/qpid/tests/address.py b/qpid/python/qpid/tests/address.py
index dd3bce37da..07349d8c6c 100644
--- a/qpid/python/qpid/tests/address.py
+++ b/qpid/python/qpid/tests/address.py
@@ -18,7 +18,6 @@
#
-from subprocess import Popen, PIPE, STDOUT
from qpid.tests import Test
from qpid.address import lex, parse, ParseError, EOF, ID, NUMBER, SYM, WSPACE, \
LEXER
@@ -82,7 +81,10 @@ class AddressTests(ParserBase, Test):
def call(self, parser, mode, input):
try:
+ from subprocess import Popen, PIPE, STDOUT
po = Popen([parser, mode], stdin=PIPE, stdout=PIPE, stderr=STDOUT)
+ except ImportError, e:
+ raise Skipped("%s" % e)
except OSError, e:
raise Skipped("%s: %s" % (e, parser))
out, _ = po.communicate(input=input)