[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9006 - trunk/gnue-common/src/utils
From: |
reinhard |
Subject: |
[gnue] r9006 - trunk/gnue-common/src/utils |
Date: |
Wed, 8 Nov 2006 15:16:17 -0600 (CST) |
Author: reinhard
Date: 2006-11-08 15:16:16 -0600 (Wed, 08 Nov 2006)
New Revision: 9006
Modified:
trunk/gnue-common/src/utils/tree.py
Log:
Replaced tabs by spaces.
Modified: trunk/gnue-common/src/utils/tree.py
===================================================================
--- trunk/gnue-common/src/utils/tree.py 2006-11-08 21:11:31 UTC (rev 9005)
+++ trunk/gnue-common/src/utils/tree.py 2006-11-08 21:16:16 UTC (rev 9006)
@@ -709,10 +709,10 @@
_node_attribs_ = {
'name': {
- 'type': str,
- 'label': u_("name"),
- 'description': u_("Name of this element"),
- 'default': None}}
+ 'type': str,
+ 'label': u_("name"),
+ 'description': u_("Name of this element"),
+ 'default': None}}
# -------------------------------------------------------------------------
@@ -747,12 +747,12 @@
except KeyError:
raise InvalidAttributeError(self, name)
- # if this is a reference to another node, look for it in the parent's
- # node dictionary
- target_type = definition['type']
+ # if this is a reference to another node, look for it in the parent's
+ # node dictionary
+ target_type = definition['type']
- # TODO: find node type for wanted class, look up name in root's node
- # dictionary.
+ # TODO: find node type for wanted class, look up name in root's node
+ # dictionary.
return self.__attribs[name]
@@ -765,21 +765,21 @@
except KeyError:
raise InvalidAttributeError(self, name)
- # typecast if necessary
- target_type = definition['type']
+ # typecast if necessary
+ target_type = definition['type']
- # if this is a reference to another node, we need to store the name
- if issubclass(target_type, NamedNode):
- target_type = unicode
+ # if this is a reference to another node, we need to store the name
+ if issubclass(target_type, NamedNode):
+ target_type = unicode
- if not isinstance(value, target_type):
- try:
- value = target_type(value)
- except Exception, e:
- raise InvalidAttributeValueError(self, name, value, e)
+ if not isinstance(value, target_type):
+ try:
+ value = target_type(value)
+ except Exception, e:
+ raise InvalidAttributeValueError(self, name, value, e)
- # TODO: check if value is in list of allowed values if defined in
- # _node_attribs_
+ # TODO: check if value is in list of allowed values if defined in
+ # _node_attribs_
self.__attribs[name] = value
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9006 - trunk/gnue-common/src/utils,
reinhard <=