gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r209920 - /gump/trunk/python/gump/core/model/property.py
Date Sat, 09 Jul 2005 02:33:01 GMT
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*'
                 



Mime
View raw message