Skip to content

Commit

Permalink
Fix type checks in ApiHelper.load()
Browse files Browse the repository at this point in the history
Use isinstance() instead of type() as the current flake8 version suggests.
  • Loading branch information
JOJ0 committed Aug 5, 2023
1 parent 0f7e2aa commit 67fae45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synadm/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ def load(self):
self.log.error("%s while reading configuration file", error)
for key, value in self.config.items():

if key == "ssl_verify" and type(value) != bool:
if key == "ssl_verify" and not isinstance(value, bool):
self.log.error("Config value error: %s, %s must be boolean",
key, value)

if not value and type(value) != bool:
if not value and not isinstance(value, bool):
self.log.error("Config entry missing: %s, %s", key, value)
return False
else:
Expand Down

0 comments on commit 67fae45

Please sign in to comment.