summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2011-03-29 17:34:30 +0200
committerMichele Simionato <michele.simionato@gmail.com>2011-03-29 17:34:30 +0200
commit3e412865b63d9a6ef799abcbec8b2d34eb6069c5 (patch)
treec9b752f7efb5fd41307f7cce2d1989b284e2dbea
parent4ffcbf0bea956c7b7feeade6cd41e7bd382a0fab (diff)
downloadmicheles-3e412865b63d9a6ef799abcbec8b2d34eb6069c5.tar.gz
Fixed a serious bug in plac doctests (raising None exceptions)
-rw-r--r--plac/plac_ext.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/plac/plac_ext.py b/plac/plac_ext.py
index b436d06..f58b84f 100644
--- a/plac/plac_ext.py
+++ b/plac/plac_ext.py
@@ -905,7 +905,8 @@ class Interpreter(object):
msg = 'line %d: input: %s\noutput: %s\nexpected: %s\n' % (
no + 1, input, task, output)
write(msg)
- raise task.etype, task.exc, task.tb
+ if task.exc:
+ raise task.etype, task.exc, task.tb
def execute(self, lineiter, verbose=False):
"Execute a lineiter of commands in a context and print the output"