diff --git a/setup.py b/setup.py index 688f8db..539946a 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ def readme(): setup( name="amcrest", - version="1.9.8", + version="1.9.9", description="Python wrapper implementation for Amcrest cameras.", long_description=readme(), author="Douglas Schilling Landgraf, Marcelo Moreira de Mello", @@ -37,5 +37,8 @@ def readme(): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], ) diff --git a/src/amcrest/utils.py b/src/amcrest/utils.py index c01b195..a54d7b6 100644 --- a/src/amcrest/utils.py +++ b/src/amcrest/utils.py @@ -14,13 +14,11 @@ from typing import List # pylint: disable=no-name-in-module -from distutils import util from typing import List, Tuple, Union DATEFMT = "%Y-%m-%d %H:%M:%S" PRECISION = 2 - def clean_url(url: str) -> str: host = re.sub(r"^http[s]?://", "", url, flags=re.IGNORECASE) host = re.sub(r"/$", "", host) @@ -53,7 +51,7 @@ def str2bool(value: Union[str, int]) -> bool: False values: n, no, false, off, 0 """ if isinstance(value, str): - return bool(util.strtobool(value)) + return value.lower() in ("y", "yes", "on", "1", "true", "t") return bool(value)