Can getBool a XML node
This commit is contained in:
parent
48fe794a7b
commit
93012ffa4c
@ -73,6 +73,13 @@ class ModuleState:
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def getBool(self, name):
|
||||||
|
"""Get the asked argument and return it as an integer"""
|
||||||
|
if name in self.attributes.keys():
|
||||||
|
return (isinstance(self.attributes[name], bool) and self.attributes[name]) or self.attributes[name] == "True"
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
def setIndex(self, fieldname = "name", tagname = None):
|
def setIndex(self, fieldname = "name", tagname = None):
|
||||||
"""Defines an hash table to accelerate childs search. You have just to define a common attribute"""
|
"""Defines an hash table to accelerate childs search. You have just to define a common attribute"""
|
||||||
self.index = dict()
|
self.index = dict()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user