Commit 4e27f7bb by Wenzel Jakob

python 2.7 fix for example 5

parent e6b2f759
......@@ -77,7 +77,8 @@ try:
test_dummy_function(lambda x, y: x + y)
print("Problem!")
except Exception as e:
if 'missing 1 required positional argument' in str(e):
if 'missing 1 required positional argument' in str(e) or \
'takes exactly 2 arguments' in str(e):
print("All OK!")
else:
print("Problem!")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment