Revision
4125
Author
wsanchez@apple.com
Date
2009-05-01 09:55:04 -0700 (Fri, 01 May 2009)

Log Message

Get rid of object.__new__() DeprecationWarning.

Modified Paths

Diff

Modified: CalendarServer/branches/release/CalendarServer-2.2-dev/lib-patches/Twisted/twisted.web2.dav.element.base.patch (4124 => 4125)


--- CalendarServer/branches/release/CalendarServer-2.2-dev/lib-patches/Twisted/twisted.web2.dav.element.base.patch	2009-05-01 16:17:03 UTC (rev 4124)
+++ CalendarServer/branches/release/CalendarServer-2.2-dev/lib-patches/Twisted/twisted.web2.dav.element.base.patch	2009-05-01 16:55:04 UTC (rev 4125)
@@ -229,6 +229,20 @@
  class WebDAVOneShotElement (WebDAVElement):
      """
      Element with exactly one WebDAVEmptyElement child and no attributes.
+@@ -346,11 +472,11 @@
+ 
+         if clazz not in WebDAVOneShotElement.__singletons:
+             WebDAVOneShotElement.__singletons[clazz] = {
+-                child: WebDAVElement.__new__(clazz, children)
++                child: WebDAVElement.__new__(clazz)
+             }
+         elif child not in WebDAVOneShotElement.__singletons[clazz]:
+             WebDAVOneShotElement.__singletons[clazz][child] = (
+-                WebDAVElement.__new__(clazz, children)
++                WebDAVElement.__new__(clazz)
+             )
+ 
+         return WebDAVOneShotElement.__singletons[clazz][child]
 @@ -364,6 +490,18 @@
          PCDATAElement: (0, None),
      }