From d98af55a0480091c2e8fd54d22f1bdba980d6d1f Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 19 Jun 2019 08:03:24 -0400 Subject: [PATCH] identifiers --- sopel_modules/SpiceBot/Sherlock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sopel_modules/SpiceBot/Sherlock.py b/sopel_modules/SpiceBot/Sherlock.py index 43b6dfa..00efe7f 100644 --- a/sopel_modules/SpiceBot/Sherlock.py +++ b/sopel_modules/SpiceBot/Sherlock.py @@ -31,10 +31,13 @@ class Sherlock(): self.dict[social_network]["cache"] = dict() def check_network(self, username, social_network): + username = str(username) if username in list(self.dict[social_network]["cache"].keys()): if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800: return self.dict[social_network]["cache"][username]["exists"] + else: + self.dict[social_network]["cache"][username] = dict() url = self.dict.get(social_network).get("url").format(username) error_type = self.dict.get(social_network).get("errorType")