diff --git a/secop/modules.py b/secop/modules.py index 73fafe4..b71912d 100644 --- a/secop/modules.py +++ b/secop/modules.py @@ -116,7 +116,7 @@ class Param(object): # return a copy of ourselfs return Param(**self.__dict__) - def as_dict(self): + def for_export(self): # used for serialisation only res = dict( description=self.description, @@ -172,7 +172,7 @@ class Command(object): return '%s(%s)' % (self.__class__.__name__, ', '.join( ['%s=%r' % (k, v) for k, v in sorted(self.__dict__.items())])) - def as_dict(self): + def for_export(self): # used for serialisation only return dict( description=self.description, diff --git a/secop/protocol/dispatcher.py b/secop/protocol/dispatcher.py index f39cda4..d02bd45 100644 --- a/secop/protocol/dispatcher.py +++ b/secop/protocol/dispatcher.py @@ -157,7 +157,7 @@ class Dispatcher(object): res = {} for paramname, param in list(self.get_module(modulename).parameters.items()): if param.export: - res[paramname] = param.as_dict() + res[paramname] = param.for_export() self.log.debug(u'list params for module %s -> %r' % (modulename, res)) return res @@ -170,7 +170,7 @@ class Dispatcher(object): # omit export=False params! res = {} for cmdname, cmdobj in list(self.get_module(modulename).commands.items()): - res[cmdname] = cmdobj.as_dict() + res[cmdname] = cmdobj.for_export() self.log.debug(u'list cmds for module %s -> %r' % (modulename, res)) return res self.log.debug(u'-> module is not to be exported!')