From 7366401b6f9cbda4882ee353538464631f9b9a69 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 8 Aug 2012 23:56:42 -0600 Subject: fixed a bug that crashed warmachine if you tried loading a class that doesn't exist in a module that does. --- wmd/irc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wmd/irc.py b/wmd/irc.py index 813f743..b06cfec 100644 --- a/wmd/irc.py +++ b/wmd/irc.py @@ -70,7 +70,12 @@ class IRC(object): self.log("Error loading module: %s" %(path,)) return - classz = getattr(module, class_name) + try: + classz = getattr(module, class_name) + except AttributeError: + self.log("Class does not exist in module") + return + self.actions[class_name] = classz() def __call__(self, *args, **kwargs): -- cgit v1.2.1