You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by aj...@apache.org on 2005/07/09 04:33:01 UTC
svn commit: r209920 - /gump/trunk/python/gump/core/model/property.py
Author: ajack
Date: Fri Jul 8 19:33:00 2005
New Revision: 209920
URL: http://svn.apache.org/viewcvs?rev=209920&view=rev
Log:
Allow args w/o values.
Modified:
gump/trunk/python/gump/core/model/property.py
Modified: gump/trunk/python/gump/core/model/property.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/model/property.py?rev=209920&r1=209919&r2=209920&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/property.py (original)
+++ gump/trunk/python/gump/core/model/property.py Fri Jul 8 19:33:00 2005
@@ -46,6 +46,9 @@
# provide default elements when not defined in xml
def complete(self,parent,workspace):
if self.isComplete(): return
+
+ # Don't normally allow blank properties
+ blankOk=False
if self.hasDomAttribute('value'):
self.value=self.getDomAttributeValue('value','')
@@ -144,11 +147,14 @@
else:
responsibleParty.addError( \
'Can\'t have path on property on workspace: ' + self.getName())
+ else:
+ # Nothing set, allow blank
+ blankOk = True
#
# Do we have a value yet?
#
- if isinstance(self.value,NoneType):
+ if not blankOk and isinstance(self.value,NoneType):
responsibleParty.addError('Unhandled Property: ' + self.getName() + ' on: ' + str(parent))
self.value='*Unset*'