From 1c8ea3ac5b628ef97e017186ed87a7b3fcbd175c Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 2 Oct 2019 11:36:36 -0400 Subject: [PATCH] remove getattr --- sopel_modules/SpiceBot/Channels.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sopel_modules/SpiceBot/Channels.py b/sopel_modules/SpiceBot/Channels.py index 01cb762..b5fe764 100644 --- a/sopel_modules/SpiceBot/Channels.py +++ b/sopel_modules/SpiceBot/Channels.py @@ -45,14 +45,6 @@ class BotChannels(): self.who_reqs = {} - def __getattr__(self, name): - ''' will only get called for undefined attributes ''' - """We will try to find a dict value, or return None""" - if name.lower() in list(self.dict.keys()): - return self.dict[str(name).lower()] - else: - raise Exception('Channel dict does not contain a function or key ' + str(name.lower())) - def total_channels(self): totalcount = len(list(self.chandict.keys())) return totalcount