Skip to content

Commit

Permalink
slightly better handler for #176; also see ongoing work at monarch-in…
Browse files Browse the repository at this point in the history
  • Loading branch information
kltm committed Mar 13, 2015
1 parent bccd717 commit e2590dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/behave/steps/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def step_impl(context, url):
## Make the attempt, fail.
response = None
try: response = urllib2.urlopen(req)
except URLError as e:
except urllib2.URLError as e:
if hasattr(e, 'code'):
print('Server error, code: ', e.code)
if hasattr(e, 'reason'):
print('Failed to reach server: ', e.reason)
elif hasattr(e, 'code'):
print('Server error, code: ', e.code)
assert True is False
else:
## Final
Expand Down

0 comments on commit e2590dd

Please sign in to comment.