Commit 3320c65e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

code cleanup.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31013 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0d255eee
......@@ -42,8 +42,6 @@ except ImportError:
from md5 import new as md5_new
from sha import new as sha_new
from zope.interface import implementedBy
from Products.ERP5Type.Globals import package_home
from Products.ERP5Type.Globals import DevelopmentMode
from Acquisition import aq_base
......@@ -75,8 +73,6 @@ from Products.ERP5Type.Cache import getReadOnlyTransactionCache
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from zLOG import LOG, BLATHER, PROBLEM, WARNING
from AccessControl.SecurityManagement import newSecurityManager, getSecurityManager
#####################################################
# Avoid importing from (possibly unpatched) Globals
#####################################################
......@@ -304,9 +300,6 @@ def uidToValue(list):
def referenceToPath(list):
pass
def pathToUid(list):
pass
# Path
def getPath(object_or_path, **kw):
"""Returns the absolute path of an object
......@@ -437,12 +430,7 @@ def updateGlobals(this_module, global_hook,
import imp
# Zope 2.6.x does not have App.Config
try:
from App.config import getConfiguration
except ImportError:
getConfiguration = None
pass
from App.config import getConfiguration
from Products.ERP5Type.Globals import InitializeClass
from Accessor.Base import func_code
......@@ -871,7 +859,6 @@ def importLocalDocument(class_id, document_path = None):
"""
import Products.ERP5Type.Document
import Permissions
import Products
if document_path is None:
instance_home = getConfiguration().instancehome
......@@ -901,7 +888,6 @@ def importLocalDocument(class_id, document_path = None):
# Temp documents are created as standard classes with a different constructor
# which patches some methods are the instance level to prevent reindexing
from Products.ERP5Type import product_path as erp5_product_path
temp_document_constructor = TempDocumentConstructor(document_class)
temp_document_constructor_name = "newTemp%s" % class_id
temp_document_constructor.__name__ = temp_document_constructor_name
......
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