Skip to content

Commit

Permalink
Fix assert leak (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricesvp authored Jul 12, 2020
1 parent 15dcb53 commit b30e1e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setuptools.setup(
name="enochecker",
version="0.1.4",
version="0.2.0",
author="domenukk",
author_email="dmaier@sect.tu-berlin.de",
description="Library to build checker scripts for EnoEngine A/D CTF Framework in Python",
Expand Down
4 changes: 2 additions & 2 deletions src/enochecker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def assert_in(o1: Any, o2: Any, message: Optional[str] = None) -> None:
:param message: An optional message that will be part of the error
"""
if message is None:
message = "{} is not in {}".format(o1, o2)
message = "Received unexpected response."
if not o2 or o1 not in o2:
raise BrokenServiceException(message)

Expand All @@ -61,7 +61,7 @@ def assert_equals(
:param autobyteify: will call ensure_bytes on both parameters.
"""
if message is None:
message = "{} is not equal to {}".format(o1, o2)
message = "Received unexpected response."
if autobyteify:
o1 = ensure_bytes(o1)
o2 = ensure_bytes(o2)
Expand Down

0 comments on commit b30e1e8

Please sign in to comment.