From 761238038034316d6efc39ab5063ab0bf6cbe756 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Mon, 17 Jun 2019 16:07:50 -0400 Subject: [PATCH] better --- sopel_modules/SpiceBot/Sherlock.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sopel_modules/SpiceBot/Sherlock.py b/sopel_modules/SpiceBot/Sherlock.py index 5f7f6f0..43b6dfa 100644 --- a/sopel_modules/SpiceBot/Sherlock.py +++ b/sopel_modules/SpiceBot/Sherlock.py @@ -33,11 +33,8 @@ class Sherlock(): def check_network(self, username, social_network): if username in list(self.dict[social_network]["cache"].keys()): - if not self.dict[social_network]["cache"][username]["exists"]: - if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800: - return True - else: - return True + if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800: + return self.dict[social_network]["cache"][username]["exists"] url = self.dict.get(social_network).get("url").format(username) error_type = self.dict.get(social_network).get("errorType")