Commit 170b1993 authored by Arnaud Fontaine's avatar Arnaud Fontaine

WIP: ZODB Components: More modules to ignore from migration

parent b72eff1a
......@@ -6492,6 +6492,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
_migrate_exception_set = set([
## Bootstrap
'Products.ERP5.ERP5Defaults',
'Products.ERP5.ERP5Site',
'Products.ERP5Type.XMLObject',
'Products.ERP5Type.ImmediateReindexContextManager',
......@@ -6499,6 +6500,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
'Products.ERP5Type.CopySupport',
'Products.ERP5Type.interfaces.json_representable',
'Products.ERP5Type.mixin.json_representable',
'Products.ERP5Type.XMLExportImport',
'Products.ERP5Type.Base',
'Products.ERP5Type.Tool.BaseTool',
'Products.ERP5Type.ERP5Type',
......@@ -6519,6 +6521,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
'Products.ERP5Type.interfaces.types_tool',
'Products.ERP5Type.interfaces.object_message',
'Products.ERP5Type.ObjectMessage',
'Products.ERP5Type.interfaces.consistency_message',
'Products.ERP5Type.ConsistencyMessage',
'Products.ERP5Type.Tool.ComponentTool',
'Products.ERP5Type.Tool.PropertySheetTool',
......@@ -6541,6 +6544,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
'Products.ERP5.Document.BaseCategory',
'Products.ERP5.Document.Node',
'Products.ERP5.Document.MetaNode',
'Products.ERP5Type.XMLMatrix',
'Products.ERP5.Document.Resource',
'Products.ERP5.Document.MetaResource',
'Products.ERP5.Document.Category',
......@@ -6555,6 +6559,8 @@ Business Template is a set of definitions, such as skins, portal types and categ
'Products.ERP5.Document.Alarm',
'Products.ERP5Type.tests.testUpgradeInstanceWithOldDataFs',
# Any Constraints may be used by upgrader, right?
'Products.ERP5Type.interfaces.constraint',
'Products.ERP5Type.mixin.constraint',
'Products.ERP5.Document.AttributeBlacklistedConstraint',
'Products.ERP5.Document.AttributeUnicityConstraint',
'Products.ERP5.Document.CategoryAcquiredMembershipStateConstraint',
......
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Yoshinori Okuji <yo@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from zLOG import (
LOG,
INFO,
TRACE,
DEBUG,
BLATHER,
INFO,
PROBLEM,
WARNING,
ERROR,
PANIC,
)
from traceback import extract_stack
marker_ = []
def log(description, content=marker_, level=INFO):
"""Put a log message
This method is supposed to be used by restricted environment,
such as Script (Python).
WARNING: When called with more than 1 argument, the first one is appended
to the usual information about the caller, in order to form a
subsystem string. Because a logging.Logger object is created for
each subsystem, and is never freed, you can experience memory
leaks if description is not constant.
"""
if content is marker_: # allow for content only while keeping interface
description, content = content, description
st = extract_stack()
head = []
for frame in st[-2:-6:-1]: # assume no deep nesting in Script (Python)
if frame[3] is not None and frame[3].startswith('self.log'): # called from class
head.append('%s, %d' % (frame[2], frame[1]))
break
if frame[0] == 'Script (Python)': # does anybody log from ZPT or dtml?
head.append('%s, %d' % (frame[2], frame[1]))
elif frame[0] == 'ERP5 Python Script':
head.append('%s, %d' % (frame[2], frame[1]))
del st # Prevent cycling references.
head = ' -> '.join(head)
description = '%s: %s' % (head, description)
LOG(description, level, content)
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