diff --git a/modules/networking.py b/modules/networking.py
index 6557a03..a6ae68d 100644
--- a/modules/networking.py
+++ b/modules/networking.py
@@ -13,7 +13,7 @@ nemubotversion = 3.3
def load(context):
from hooks import Hook
- if not CONF.hasNode("whoisxmlapi") or not CONF.getNode("whoisxmlapi").hasAttribute("username") or not CONF.getNode("whoisxmlapi").hasAttribute("password"):
+ if not CONF or not CONF.hasNode("whoisxmlapi") or not CONF.getNode("whoisxmlapi").hasAttribute("username") or not CONF.getNode("whoisxmlapi").hasAttribute("password"):
print ("You need a WhoisXML API account in order to use the "
"!netwhois feature. Add it to the module configuration file:\n"
"\nRegister at "
diff --git a/modules/weather.py b/modules/weather.py
index d902958..ca0f236 100644
--- a/modules/weather.py
+++ b/modules/weather.py
@@ -12,7 +12,7 @@ def load(context):
global DATAS
DATAS.setIndex("name", "city")
- if not CONF.hasNode("darkskyapi") or not CONF.getNode("darkskyapi").hasAttribute("key"):
+ if not CONF or not CONF.hasNode("darkskyapi") or not CONF.getNode("darkskyapi").hasAttribute("key"):
print ("You need a Dark-Sky API key in order to use this "
"module. Add it to the module configuration file:\n\nRegister at "