fix: added message when ValueError is raised for strtobool replacement

This commit is contained in:
Stephen Sadowski 2022-01-24 06:52:36 -06:00
parent 768d0e09b5
commit bbffdcbd68
2 changed files with 2 additions and 3 deletions

View File

@ -18,7 +18,7 @@ def strtobool(query: str) -> bool:
elif query.lower() in ["n", "no", "f", "false", "off", "0"]: elif query.lower() in ["n", "no", "f", "false", "off", "0"]:
return False return False
else: else:
raise ValueError raise ValueError(f'String value {query} cannot be converted to bool')
def try_use_uvloop() -> None: def try_use_uvloop() -> None:

View File

@ -22,8 +22,7 @@ def strtobool(query: str) -> bool:
elif query.lower() in ["n", "no", "f", "false", "off", "0"]: elif query.lower() in ["n", "no", "f", "false", "off", "0"]:
return False return False
else: else:
raise ValueError raise ValueError(f'String value {query} cannot be converted to bool')
class PyTest(TestCommand): class PyTest(TestCommand):
""" """