[Commits] (pavlov) check and see if an item has a shared url before trying to export it again with a different one.

commits at osafoundation.org commits at osafoundation.org
Tue Aug 17 13:00:48 PDT 2004


Commit by: pavlov
Modified files:
chandler/parcels/osaf/framework/webdav/Sync.py 1.3 1.4

Log message:
check and see if an item has a shared url before trying to export it again with a different one.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/webdav/Sync.py.diff?r1=text&tr1=1.3&r2=text&tr2=1.4

Index: chandler/parcels/osaf/framework/webdav/Sync.py
diff -u chandler/parcels/osaf/framework/webdav/Sync.py:1.3 chandler/parcels/osaf/framework/webdav/Sync.py:1.4
--- chandler/parcels/osaf/framework/webdav/Sync.py:1.3	Tue Aug 17 11:39:05 2004
+++ chandler/parcels/osaf/framework/webdav/Sync.py	Tue Aug 17 13:00:47 2004
@@ -102,7 +102,8 @@
             for i in value:
                 if isinstance(i, Item):
                     # mmm, recursion
-                    durl = dav.url.join(i.itsUUID.str16())
+                    defaultURL = dav.url.join(i.itsUUID.str16())
+                    durl = i.getAttributeValue('sharedURL', default=defaultURL)
                     DAV(durl).put(i)
                     listData += '<itemref>' + unicode(durl) + '</itemref>'
                 else:
@@ -112,7 +113,8 @@
 
         elif acard == 'single':
             if isinstance(value, Item):
-                durl = dav.url.join(value.itsUUID.str16())
+                defaultURL = dav.url.join(i.itsUUID.str16())
+                durl = i.getAttributeValue('sharedURL', default=defaultURL)
                 DAV(durl).put(value)
                 props += makePropString(name, namespace, '<itemref>%s</itemref>' % (unicode(durl)))
             else:



More information about the Commits mailing list