Start ModuleStatesFile and ModuleState class
This commit is contained in:
parent
1bb3617049
commit
684cecd137
25
imodule.py
25
imodule.py
@ -9,6 +9,31 @@ class ModuleException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class ModuleState:
|
class ModuleState:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.name = name
|
||||||
|
self.attributes = dict()
|
||||||
|
self.childs = list()
|
||||||
|
|
||||||
|
def getName(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
def getAttribute(self, name):
|
||||||
|
if name in self.attributes:
|
||||||
|
return self.attributes[name]
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
def setAttribute(self, name, value):
|
||||||
|
self.attributes[name] = value
|
||||||
|
|
||||||
|
def getChilds(self):
|
||||||
|
return self.childs
|
||||||
|
|
||||||
|
def addChild(self, child):
|
||||||
|
self.childs.append(child)
|
||||||
|
|
||||||
|
|
||||||
|
class ModuleStateFile:
|
||||||
def __init__(self, filename):
|
def __init__(self, filename):
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
|
|
||||||
|
@ -287,6 +287,8 @@ class Message:
|
|||||||
if im.parselisten(self):
|
if im.parselisten(self):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# def parseOwnerCmd(self, cmd):
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
# #
|
# #
|
||||||
|
Loading…
x
Reference in New Issue
Block a user