Refactor _id() function to be inline

This commit is contained in:
Nicholas Charriere 2016-07-18 13:35:57 -07:00
parent db1ef7673e
commit d88cf2600e

View file

@ -22,12 +22,8 @@ time_conversion = {
} }
def _id():
return uuid.uuid4().hex
def set_password(password, ttl): def set_password(password, ttl):
key = _id() key = uuid.uuid4().hex
redis_client.set(key, password) redis_client.set(key, password)
redis_client.expire(key, ttl) redis_client.expire(key, ttl)
return key return key