Commit 46966cdb authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

patches/OFSPdata: drop getLastPdata patch

This is in SyncMLUtils
parent 52bc7249
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
############################################################################## ##############################################################################
# Required modules - some modules are imported later to prevent circular deadlocks # Required modules - some modules are imported later to prevent circular deadlocks
import six
import persistent import persistent
from hashlib import md5 from hashlib import md5
...@@ -186,9 +187,15 @@ class PdataHelper(persistent.Persistent): ...@@ -186,9 +187,15 @@ class PdataHelper(persistent.Persistent):
of a Pdata chains of a Pdata chains
""" """
pdata = self._data pdata = self._data
if six.PY2:
next_ = pdata.next next_ = pdata.next
else:
next_ = pdata.__next__
while next_ is not None: while next_ is not None:
pdata = next_ pdata = next_
if six.PY2:
next_ = pdata.next next_ = pdata.next
else:
next_ = pdata.__next__
return pdata return pdata
...@@ -30,23 +30,6 @@ import six ...@@ -30,23 +30,6 @@ import six
from OFS.Image import Pdata from OFS.Image import Pdata
def getLastPdata(self):
"""Return the last Pdata chunk"""
if six.PY2:
next = self.next
else:
next = self.__next__
while next is not None:
self = next
if six.PY2:
next = self.next
else:
next = self.__next__
return self
Pdata.getLastPdata = getLastPdata
def __nonzero__(self): def __nonzero__(self):
while not self.data: while not self.data:
if six.PY2: if six.PY2:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment