From d88cf2600e1bf6a61601092e3e17d1a29fb6a6e1 Mon Sep 17 00:00:00 2001 From: Nicholas Charriere Date: Mon, 18 Jul 2016 13:35:57 -0700 Subject: [PATCH] Refactor _id() function to be inline --- snappass/main.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/snappass/main.py b/snappass/main.py index 9dd8f61..3c84820 100644 --- a/snappass/main.py +++ b/snappass/main.py @@ -22,12 +22,8 @@ time_conversion = { } -def _id(): - return uuid.uuid4().hex - - def set_password(password, ttl): - key = _id() + key = uuid.uuid4().hex redis_client.set(key, password) redis_client.expire(key, ttl) return key