fix: added message when ValueError is raised for strtobool replacement
This commit is contained in:
parent
768d0e09b5
commit
bbffdcbd68
|
@ -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:
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -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):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user