Commit 9d80350c authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use pre-defined types.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5660 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9a808df9
......@@ -46,6 +46,7 @@ import threading
import sys
from ZODB.POSException import ConflictError
from OFS.Traversable import NotFound
from types import TupleType, StringType
from zLOG import LOG, INFO, WARNING
......@@ -77,11 +78,11 @@ def registerActivity(activity):
class Message:
def __init__(self, object, active_process, activity_kw, method_id, args, kw):
if type(object) is type('a'):
if type(object) is StringType:
self.object_path = object.split('/')
else:
self.object_path = object.getPhysicalPath()
if type(active_process) is type('a'):
if type(active_process) is StringType:
self.active_process = active_process.split('/')
elif active_process is None:
self.active_process = None
......@@ -558,7 +559,7 @@ class ActivityTool (Folder, UniqueObject):
global is_initialized
if not is_initialized: self.initialize()
if not hasattr(self, '_v_activity_buffer'): self._v_activity_buffer = ActivityBuffer()
if type(object) is type(()):
if type(object) is TupleType:
object_path = object
else:
object_path = object.getPhysicalPath()
......
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