getrandbits creates an int, not a float

This commit is contained in:
Joseph Schorr 2015-03-26 15:47:44 -04:00
parent aaf1b23e98
commit 4d1792db1c

View file

@ -148,9 +148,9 @@ class UserAuthentication(object):
from app import app
app_secret_key = app.config['SECRET_KEY']
# First try parsing the key as a float.
# First try parsing the key as an int.
try:
secret_key = float(app_secret_key)
secret_key = int(app_secret_key)
except ValueError:
secret_key = app_secret_key