summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Ramacher <sebastian@ramacher.at>2013-04-05 12:22:36 +0200
committerSebastian Ramacher <sebastian@ramacher.at>2013-04-05 12:22:36 +0200
commite60056466f5e181cd31e444ccc4aefd948328996 (patch)
treeda19a33299ade0fa6a15ac51cb2f7db6cabb69e0
parent18137d0e42d760efa6428ff8e68e2ed865cb6a70 (diff)
downloadpycrypto-e60056466f5e181cd31e444ccc4aefd948328996.tar.gz
Use correct stream
If stream is None, write the value of StringIO to sys.stderr. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
-rw-r--r--lib/Crypto/SelfTest/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Crypto/SelfTest/__init__.py b/lib/Crypto/SelfTest/__init__.py
index 40b3969..e2da0f8 100644
--- a/lib/Crypto/SelfTest/__init__.py
+++ b/lib/Crypto/SelfTest/__init__.py
@@ -70,7 +70,7 @@ def run(module=None, verbosity=0, stream=None, tests=None, config=None, **kwargs
result = runner.run(suite)
if not result.wasSuccessful():
if stream is None:
- sys.stderr.write(stream.getvalue())
+ sys.stderr.write(kwargs['stream'].getvalue())
raise SelfTestError("Self-test failed", result)
return result