python 2.7 fix for example 5

This commit is contained in:
Wenzel Jakob 2016-07-10 11:01:35 +02:00
parent e6b2f75949
commit 4e27f7bb13

View File

@ -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!")