Skip to content

Commit

Permalink
simplify auth check
Browse files Browse the repository at this point in the history
  • Loading branch information
CM000n committed Feb 14, 2023
1 parent b355cc2 commit e4afeb5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions custom_components/qss/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,8 @@ def _insert_row_without_auth(host: str, port: int, event: Event) -> None:
sender.flush()


def _check_all_auth_values_exist(auth: tuple) -> bool:
return auth.count(None) <= 0


def _insert_row(host: str, port: int, auth: tuple, event: Event) -> None:
if _check_all_auth_values_exist(auth) is True:
if all(auth):
_insert_row_with_auth(host, port, auth, event)
else:
_insert_row_without_auth(host, port, event)
Expand Down

0 comments on commit e4afeb5

Please sign in to comment.