Improve syntax
This commit is contained in:
parent
e7c826d4c6
commit
d4ae6255d6
2 changed files with 4 additions and 13 deletions
|
@ -76,10 +76,7 @@ class PrivateAPI:
|
|||
logger.error("client password needs to be set")
|
||||
return False
|
||||
try:
|
||||
if not hmac.compare_digest(self.clientToken, token):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return hmac.compare_digest(self.clientToken, token)
|
||||
except TypeError:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue