Skip to content

Commit

Permalink
Fix handling parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
vladtcvs committed Mar 15, 2018
1 parent 39dcb1f commit 87c4cb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tempesta_fw/t/functional/helpers/deproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,10 @@ def handle_write(self):

def handle_error(self):
_, v, _ = sys.exc_info()
error.bug('\tDeproxy: Client: %s' % v)
if type(v) == ParseError:
raise v
else:
error.bug('\tDeproxy: Client: %s' % type(v))



Expand Down
4 changes: 2 additions & 2 deletions tempesta_fw/t/functional/testers/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ def generic_test_routine(self, tempesta_defconfig, message_chains):

try:
self.tester.run()
except ParseError:
self.assertTrue(False, msg="Parsing error")
except ParseError as err:
self.assertTrue(False, msg=err)

self.tempesta.get_stats()
self.assert_tempesta()
Expand Down

0 comments on commit 87c4cb1

Please sign in to comment.