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 ...@@ -46,6 +46,7 @@ import threading
import sys import sys
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from OFS.Traversable import NotFound from OFS.Traversable import NotFound
from types import TupleType, StringType
from zLOG import LOG, INFO, WARNING from zLOG import LOG, INFO, WARNING
...@@ -77,11 +78,11 @@ def registerActivity(activity): ...@@ -77,11 +78,11 @@ def registerActivity(activity):
class Message: class Message:
def __init__(self, object, active_process, activity_kw, method_id, args, kw): 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('/') self.object_path = object.split('/')
else: else:
self.object_path = object.getPhysicalPath() self.object_path = object.getPhysicalPath()
if type(active_process) is type('a'): if type(active_process) is StringType:
self.active_process = active_process.split('/') self.active_process = active_process.split('/')
elif active_process is None: elif active_process is None:
self.active_process = None self.active_process = None
...@@ -558,7 +559,7 @@ class ActivityTool (Folder, UniqueObject): ...@@ -558,7 +559,7 @@ class ActivityTool (Folder, UniqueObject):
global is_initialized global is_initialized
if not is_initialized: self.initialize() if not is_initialized: self.initialize()
if not hasattr(self, '_v_activity_buffer'): self._v_activity_buffer = ActivityBuffer() 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 object_path = object
else: else:
object_path = object.getPhysicalPath() 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