[Commits] (morgen) Now keeps track of the line number for delayed attribute assignments

commits at osafoundation.org commits at osafoundation.org
Tue Jan 20 15:39:50 PST 2004


Commit by: morgen
Modified files:
osaf/chandler/Chandler/repository/parcel/ParcelLoader.py 1.11 1.12

Log message:
Now keeps track of the line number for delayed attribute assignments


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/osaf/chandler/Chandler/repository/parcel/ParcelLoader.py.diff?r1=text&tr1=1.11&r2=text&tr2=1.12

Index: osaf/chandler/Chandler/repository/parcel/ParcelLoader.py
diff -u osaf/chandler/Chandler/repository/parcel/ParcelLoader.py:1.11 osaf/chandler/Chandler/repository/parcel/ParcelLoader.py:1.12
--- osaf/chandler/Chandler/repository/parcel/ParcelLoader.py:1.11	Fri Jan 16 14:45:46 2004
+++ osaf/chandler/Chandler/repository/parcel/ParcelLoader.py	Tue Jan 20 15:39:18 2004
@@ -6,8 +6,8 @@
     (3) Empty list, None types not handled properly
 """
 
-__revision__  = "$Revision: 1.11 $"
-__date__      = "$Date: 2004/01/16 22:45:46 $"
+__revision__  = "$Revision: 1.12 $"
+__date__      = "$Date: 2004/01/20 23:39:18 $"
 __copyright__ = "Copyright (c) 2003 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -208,7 +208,7 @@
         self.mapping[prefix] = None
 
 
-    def makeValue(self, item, attributeName, attributeTypePath, value):
+    def makeValue(self, item, attributeName, attributeTypePath, value, line):
         """ Creates a value from a string, based on the type
             of the attribute.
         """
@@ -218,14 +218,14 @@
         else:
             assert item, \
                    "No parent item at %s:%s" % (self.locator.getSystemId(),
-                                                self.locator.getLineNumber())
+                                               line)
 
             kindItem = item.kind
             attributeItem = kindItem.getAttribute(attributeName)
 
             assert attributeItem, \
                    "No Attribute at %s:%s" % (self.locator.getSystemId(),
-                                              self.locator.getLineNumber())
+                                              line)
         
             value = attributeItem.type.makeValue(value)
 
@@ -307,7 +307,6 @@
         # parser has already mapped the prefix to the namespace (uri).
         kind = self.findItem(uri, local,
                              self.locator.getLineNumber())
-            
         assert kind, \
                "No kind (%s/%s) at %s:%s" % (uri, local,
                                              self.locator.getSystemId(),
@@ -355,7 +354,7 @@
                 attributeTypePath = namespace
 
                 value = self.makeValue(item, attributeName, attributeTypePath,
-                 name)
+                 name, line)
                 if key:
                     item.setValue(attributeName, value, key)
                 else:



More information about the Commits mailing list