gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r1326242 - /gump/trunk/python/gump/core/model/property.py
Date Sun, 15 Apr 2012 01:10:58 GMT
Author: billbarker
Date: Sun Apr 15 01:10:57 2012
New Revision: 1326242

URL: http://svn.apache.org/viewvc?rev=1326242&view=rev
Log:
Delay the evaluation of references to get the actual artifact, and not just the glob pattern
in properties

Modified:
    gump/trunk/python/gump/core/model/property.py

Modified: gump/trunk/python/gump/core/model/property.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/property.py?rev=1326242&r1=1326241&r2=1326242&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/property.py (original)
+++ gump/trunk/python/gump/core/model/property.py Sun Apr 15 01:10:57 2012
@@ -37,6 +37,10 @@ class Property(NamedModelObject):
 
         self.value = None
 
+        self.output = None
+
+        self.reference = None
+
 
     def setValue(self, value):
         """
@@ -48,6 +52,11 @@ class Property(NamedModelObject):
         """
         Get a value
         """
+        if self.output :
+            if self.reference == 'jarpath' or self.reference == 'outputpath':
+                self.setValue(self.output.getPath())
+            else:
+                self.setValue(self.output.getName())
         return self.value
 
     # provide default elements when not defined in xml
@@ -184,10 +193,8 @@ class Property(NamedModelObject):
         """
         set value to path or name of output depending on reference attribute
         """
-        if reference == 'jarpath' or reference == 'outputpath':
-            self.setValue(output.getPath())
-        else:
-            self.setValue(output.getName())
+        self.output = output
+        self.reference = reference
 
     def type_matches(self, output):
         """



Mime
View raw message