Update consumers.py

Caught a syntax issue at line number 78, modified the syntax to return correct value of nonce_diff.
This commit is contained in:
Saurabh Thakre 2020-12-16 09:45:53 +05:30 committed by GitHub
parent 33c3a6d89b
commit dae1f8dc7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ class WebsocketSecretAuthHelper:
nonce_diff = now - nonce_parsed
if abs(nonce_diff) > nonce_tolerance:
logger.warn(f"Potential replay attack or machine(s) time out of sync by {nonce_diff} seconds.")
raise ValueError("Potential replay attack or machine(s) time out of sync by {nonce_diff} seconds.")
raise ValueError(f"Potential replay attack or machine(s) time out of sync by {nonce_diff} seconds.")
return True