1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-20 18:27:23 +01:00

Fixed E721 (type-comparison): Use is and is not for type comparisons, or isinstance() for isinstance checks

This commit is contained in:
Teal Dulcet
2023-12-23 05:32:34 -08:00
committed by Joshua Tauberer
parent f0377dd59e
commit cacf6d2006
2 changed files with 2 additions and 2 deletions

View File

@@ -490,7 +490,7 @@ def totp_post_enable():
secret = request.form.get('secret')
token = request.form.get('token')
label = request.form.get('label')
if type(token) != str:
if not isinstance(token, str):
return ("Bad Input", 400)
try:
validate_totp_secret(secret)