From 3731f7ef7034be0ef34b247cea684ab8aed35922 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sat, 6 Jul 2019 07:58:29 -0400 Subject: [PATCH] test --- sopel_modules/spicemanip/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sopel_modules/spicemanip/__init__.py b/sopel_modules/spicemanip/__init__.py index 395a307..9f2e5bc 100644 --- a/sopel_modules/spicemanip/__init__.py +++ b/sopel_modules/spicemanip/__init__.py @@ -21,7 +21,7 @@ class Spicemanip(): def __call__(self, inputs, task, output_type='default'): - if hasattr(self, task): + if hasattr(self, str(task)): raise Exception( str(self.task) + " is not a valid spicemanip function.") @@ -45,7 +45,7 @@ class Spicemanip(): def core_class_cleanup(self): for classitem in ["inputs", "task", "output_type"]: - if hasattr(self, classitem): + if hasattr(self, str(classitem)): del classitem def core_input_handler(self): @@ -118,7 +118,7 @@ class Spicemanip(): str(self.task).replace("<", "")) elif hasattr(self, - self.task) and not str(self.task).startswith("core_"): + str(self.task)) and not str(self.task).startswith("core_"): self.outputs = eval('self.' + str(self.task) + '(inputs)') else: