Null check on logger

This commit is contained in:
simon987 2021-11-03 16:47:21 -04:00
parent 408735a926
commit 18ba0024ea
2 changed files with 3 additions and 2 deletions

View File

@ -188,7 +188,8 @@ class Web:
self._post = post
def _error_callback(self, e):
self._logger.critical(f"{self._format_url(*self._current_req)}: {e}")
if self._logger:
self._logger.critical(f"{self._format_url(*self._current_req)}: {e}")
def _format_url(self, method, url, kwargs, r=None):
if "params" in kwargs and kwargs["params"]:

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="hexlib",
version="1.64",
version="1.65",
description="Misc utility methods",
author="simon987",
author_email="me@simon987.net",