Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
],
)
4 changes: 1 addition & 3 deletions src/amcrest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)


Expand Down