Commit ca313e8b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

py2/py3: use six.get_unbound_function.

parent 5fecc1d3
......@@ -35,8 +35,9 @@ from Products.ERP5Type.patches.WorkflowTool import \
WorkflowHistoryList as LegacyWorkflowHistoryList
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from six.moves import range
from six import get_unbound_function
orig_maybe_rotate = DoublyLinkList._maybe_rotate.__func__
orig_maybe_rotate = get_unbound_function(DoublyLinkList._maybe_rotate)
def _maybe_rotate(self):
if len(self._log) < 16:
......
......@@ -31,7 +31,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from erp5.component.document.Movement import Movement
from six import get_unbound_function
class DummyMovement(Movement):
"""Dummy Movement for testing purposes."""
......@@ -72,7 +72,7 @@ class DummyMovement(Movement):
parent = self.getParentValue()
if isinstance(parent, DummyDelivery):
self = parent
return DummyDelivery.getSimulationState(self)
return get_unbound_function(DummyDelivery.getSimulationState)(self)
def getDeliveryValue(self):
"""
......
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