Improve the debug mode
This commit is contained in:
parent
cc900a2b4c
commit
d90e489fc6
4 changed files with 23 additions and 2 deletions
|
@ -0,0 +1,12 @@
|
|||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def strtobool(s: str) -> bool:
|
||||
if s in ['y', 'yes', 'true', 'on', '1']:
|
||||
return True
|
||||
if s in ['n', 'no', 'false', 'off', '0']:
|
||||
return False
|
||||
|
||||
raise ValueError(f'cannot convert {s} to bool')
|
Loading…
Add table
Add a link
Reference in a new issue