fixing a few linter errors.

This commit is contained in:
Thomas Göttgens
2023-03-31 13:46:19 +02:00
parent 7e6f13f0a2
commit 97aa8a8d74
3 changed files with 3 additions and 127 deletions

View File

@@ -584,10 +584,9 @@ def check_if_newer_version():
pypi_version = None
try:
url = "https://pypi.org/pypi/meshtastic/json"
data = requests.get(url).json()
data = requests.get(url, timeout=5).json()
pypi_version = data["info"]["version"]
except Exception as e:
# print(f"could not get version from pypi e:{e}")
except Exception:
pass
act_version = pkg_resources.get_distribution("meshtastic").version
if pypi_version and pkg_resources.parse_version(