From ee9e996fa12ae1be1669fb1ed70733f6ad538a56 Mon Sep 17 00:00:00 2001 From: Nicholas Charriere Date: Sat, 22 Apr 2017 22:29:25 -0700 Subject: [PATCH] All Caps for constant vars --- snappass/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snappass/main.py b/snappass/main.py index 8f942a5..f272d41 100644 --- a/snappass/main.py +++ b/snappass/main.py @@ -31,7 +31,7 @@ else: redis_client = redis.StrictRedis( host=redis_host, port=redis_port, db=redis_db) -time_conversion = {'week': 604800, 'day': 86400, 'hour': 3600} +TIME_CONVERSION = {'week': 604800, 'day': 86400, 'hour': 3600} def check_redis_alive(fn): @@ -82,10 +82,10 @@ def clean_input(): abort(400) time_period = request.form['ttl'].lower() - if time_period not in time_conversion: + if time_period not in TIME_CONVERSION: abort(400) - return time_conversion[time_period], request.form['password'] + return TIME_CONVERSION[time_period], request.form['password'] def request_is_valid(request):