SF.net SVN: fclient: [342] trunk/sandbox/fcp2/config.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-03-08 11:13:37
|
Revision: 342
http://fclient.svn.sourceforge.net/fclient/?rev=342&view=rev
Author: jUrner
Date: 2008-03-08 03:13:42 -0800 (Sat, 08 Mar 2008)
Log Message:
-----------
adapt to new message handling
Modified Paths:
--------------
trunk/sandbox/fcp2/config.py
Modified: trunk/sandbox/fcp2/config.py
===================================================================
--- trunk/sandbox/fcp2/config.py 2008-03-08 11:13:11 UTC (rev 341)
+++ trunk/sandbox/fcp2/config.py 2008-03-08 11:13:42 UTC (rev 342)
@@ -59,6 +59,7 @@
from fcp2 import consts
from fcp2 import types
+from fcp2 import message
from fcp2.fcp_lib import uuid
@@ -129,7 +130,6 @@
self.parent = None
self.name = None
self.children = {}
- self._configMessageParams = types.ConfigMessageParams()
self._log = logging.getLogger(consts.LoggerNames.Config)
if configDataMsg is not None:
@@ -162,14 +162,14 @@
@note: if the item does not already exist it is created
@note: if the key is unknown its type will always be set to L{types.FcpType}
"""
- paramClass, components = self._configMessageParams.splitParamClass(key)
- paramType = self._configMessageParams.get(key, None)
+ paramClass, components = message.ConfigMessageParamTypes.splitParamClass(key)
+ paramType = message.ConfigMessageParamTypes.get(key, None)
if paramType is None:
paramType = types.FcpType
self._log.warning('Unknown key: %r' % components)
# find or create new config item if necessary
- components = self._configMessageParams.splitAll(components)
+ components = message.ConfigMessageParamTypes.splitAll(components)
parent = self
for component in components:
item = parent.children.get(component, None)
@@ -187,8 +187,8 @@
@return: (str) key
@note: if the key does not contain the paramClass it is returned unchanged
"""
- head, tail = self._configMessageParams.splitParamClass(key)
- if head in self._configMessageParams.ParamClasses:
+ head, tail = message.ConfigMessageParamTypes.splitParamClass(key)
+ if head in message.ConfigMessageParamTypes.ParamClasses:
return tail
return tail
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|