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:
parent
92530ef1b2
commit
c560e13f24
18 changed files with 370 additions and 122 deletions
|
|
@ -18,7 +18,7 @@ URL_API = None # http://www.velib.paris.fr/service/stationdetails/paris/%s
|
|||
|
||||
def load(context):
|
||||
global URL_API
|
||||
if not context.config or not context.config.hasAttribute("url"):
|
||||
if not context.config or "url" not in context.config:
|
||||
raise ImportError("Please provide url attribute in the module configuration")
|
||||
URL_API = context.config["url"]
|
||||
context.data.setIndex("name", "station")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue