1
0
Fork 0

Start ModuleStatesFile and ModuleState class

This commit is contained in:
Némunaire 2012-05-23 12:29:36 +02:00
parent 1bb3617049
commit 684cecd137
2 changed files with 27 additions and 0 deletions

View File

@ -9,6 +9,31 @@ class ModuleException(Exception):
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):
self.filename = filename

View File

@ -287,6 +287,8 @@ class Message:
if im.parselisten(self):
return
# def parseOwnerCmd(self, cmd):
##############################
# #