Rework XML parser: part 1

This is the first step of the parser refactoring: here we change
	the configuration, next step will change data saving.
This commit is contained in:
nemunaire 2015-10-27 18:03:28 +01:00
commit c560e13f24
18 changed files with 370 additions and 122 deletions

View file

@ -11,7 +11,7 @@ URL_WHOIS = "http://www.whoisxmlapi.com/whoisserver/WhoisService?rid=1&domainNam
def load(CONF, add_hook):
global URL_WHOIS
if not CONF or 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 "username" not in CONF.getNode("whoisxmlapi") or "password" not in CONF.getNode("whoisxmlapi"):
raise ImportError("You need a WhoisXML API account in order to use "
"the !netwhois feature. Add it to the module "
"configuration file:\n<whoisxmlapi username=\"XX\" "