diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2010-01-20 20:58:10 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2010-01-20 20:58:10 +0000 |
| commit | fae546d48f1572ef30c510361bac3ed4c11de59b (patch) | |
| tree | 2f9d6bc13fb07c72b3eaf95605efb10ae0b1edaa /python | |
| parent | dd8078e03108bd9c9f602c82f396511927d05cc7 (diff) | |
| download | qpid-python-fae546d48f1572ef30c510361bac3ed4c11de59b.tar.gz | |
only import the subprocess module when needed
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@901378 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/qpid/tests/address.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/qpid/tests/address.py b/python/qpid/tests/address.py index dd3bce37da..07349d8c6c 100644 --- a/python/qpid/tests/address.py +++ b/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) |
