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 @@
##############################################################################
# Required modules - some modules are imported later to prevent circular deadlocks
import six
import persistent
from hashlib import md5
......@@ -186,9 +187,15 @@ class PdataHelper(persistent.Persistent):
of a Pdata chains
"""
pdata = self._data
if six.PY2:
next_ = pdata.next
else:
next_ = pdata.__next__
while next_ is not None:
pdata = next_
if six.PY2:
next_ = pdata.next
else:
next_ = pdata.__next__
return pdata
......@@ -30,23 +30,6 @@ import six
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):
while not self.data:
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