Commit 84d686f0 authored by Jérome Perrin's avatar Jérome Perrin

fix more undefined names


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16395 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 396743f9
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from zLOG import LOG
from zLOG import WARNING
class DefaultGetter(Method): class DefaultGetter(Method):
""" """
...@@ -50,7 +53,7 @@ class DefaultGetter(Method): ...@@ -50,7 +53,7 @@ class DefaultGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getDefaultRelatedProperty( return instance._getDefaultRelatedProperty(
self._key, 'relative_url', self._key, 'relative_url',
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -83,7 +86,7 @@ class ListGetter(Method): ...@@ -83,7 +86,7 @@ class ListGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getRelatedPropertyList( return instance._getRelatedPropertyList(
self._key, 'relative_url', self._key, 'relative_url',
spec=kw.get('spec',()), spec=kw.get('spec',()),
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
from Base import func_code, type_definition, list_types, \ from Base import func_code, type_definition, list_types, \
ATTRIBUTE_PREFIX, Method ATTRIBUTE_PREFIX, Method
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from zLOG import LOG
from zLOG import WARNING
class DefaultGetter(Method): class DefaultGetter(Method):
""" """
...@@ -55,7 +57,7 @@ class DefaultGetter(Method): ...@@ -55,7 +57,7 @@ class DefaultGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getDefaultRelatedValue( return instance._getDefaultRelatedValue(
self._key, self._key,
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -95,7 +97,7 @@ class ListGetter(Method): ...@@ -95,7 +97,7 @@ class ListGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getRelatedValueList( return instance._getRelatedValueList(
self._key, self._key,
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -138,7 +140,7 @@ class DefaultIdGetter(Method): ...@@ -138,7 +140,7 @@ class DefaultIdGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getDefaultRelatedProperty( return instance._getDefaultRelatedProperty(
self._key, 'id', self._key, 'id',
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -174,7 +176,7 @@ class IdListGetter(Method): ...@@ -174,7 +176,7 @@ class IdListGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getRelatedPropertyList( return instance._getRelatedPropertyList(
self._key, 'id', self._key, 'id',
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -217,7 +219,7 @@ class DefaultTitleGetter(Method): ...@@ -217,7 +219,7 @@ class DefaultTitleGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getDefaultRelatedProperty( return instance._getDefaultRelatedProperty(
self._key, 'title', self._key, 'title',
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -253,7 +255,7 @@ class TitleListGetter(Method): ...@@ -253,7 +255,7 @@ class TitleListGetter(Method):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getRelatedPropertyList( return instance._getRelatedPropertyList(
self._key, 'title', self._key, 'title',
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -296,7 +298,7 @@ class DefaultPropertyGetter(Method): ...@@ -296,7 +298,7 @@ class DefaultPropertyGetter(Method):
def __call__(self, instance, key, *args, **kw): def __call__(self, instance, key, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getDefaultRelatedProperty( return instance._getDefaultRelatedProperty(
self._key, key, self._key, key,
spec=kw.get('spec',()), spec=kw.get('spec',()),
...@@ -331,7 +333,7 @@ class PropertyListGetter(Method): ...@@ -331,7 +333,7 @@ class PropertyListGetter(Method):
def __call__(self, instance, key, *args, **kw): def __call__(self, instance, key, *args, **kw):
if self._warning: if self._warning:
LOG("ERP5Type Deprecated Getter Id:",0, self._id) LOG("ERP5Type", WARNING, "Deprecated Getter Id: %s" % self._id)
return instance._getRelatedPropertyList( return instance._getRelatedPropertyList(
self._key, key, self._key, key,
spec=kw.get('spec',()), spec=kw.get('spec',()),
......
...@@ -12,7 +12,7 @@ class DocumentationSection(Implicit): ...@@ -12,7 +12,7 @@ class DocumentationSection(Implicit):
self.id = id self.id = id
self.title = title self.title = title
self.class_name = class_name self.class_name = class_name
self.uri uri self.uri = uri
# more API needed XXX # more API needed XXX
......
...@@ -71,6 +71,6 @@ class Error: ...@@ -71,6 +71,6 @@ class Error:
""" """
A simple getter A simple getter
""" """
return getattr(self, value, d) return getattr(self, key, d)
allow_class(Error) allow_class(Error)
...@@ -28,14 +28,12 @@ ...@@ -28,14 +28,12 @@
# Required modules - some modules are imported later to prevent circular deadlocks # Required modules - some modules are imported later to prevent circular deadlocks
import os import os
import sys
import re import re
import string import string
import time import time
from Globals import package_home from Globals import package_home
from Globals import DevelopmentMode from Globals import DevelopmentMode
from ZPublisher.HTTPRequest import FileUpload
from Acquisition import aq_base from Acquisition import aq_base
from Acquisition import aq_inner from Acquisition import aq_inner
from Acquisition import aq_parent from Acquisition import aq_parent
...@@ -51,8 +49,6 @@ from Products.ZCatalog.Lazy import LazyMap ...@@ -51,8 +49,6 @@ from Products.ZCatalog.Lazy import LazyMap
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type import Constraint from Products.ERP5Type import Constraint
from Products.ERP5Type import Interface
from Products.ERP5Type import PropertySheet
from zLOG import LOG, BLATHER, PROBLEM from zLOG import LOG, BLATHER, PROBLEM
...@@ -61,7 +57,8 @@ from zLOG import LOG, BLATHER, PROBLEM ...@@ -61,7 +57,8 @@ from zLOG import LOG, BLATHER, PROBLEM
# Compatibility - XXX - BAD # Compatibility - XXX - BAD
##################################################### #####################################################
from Accessor.TypeDefinition import * from Accessor.TypeDefinition import type_definition
from Accessor.TypeDefinition import list_types
##################################################### #####################################################
# Generic sort method # Generic sort method
...@@ -179,7 +176,6 @@ def cartesianProduct(list_of_list): ...@@ -179,7 +176,6 @@ def cartesianProduct(list_of_list):
# Some list operations # Some list operations
def keepIn(value_list, filter_list): def keepIn(value_list, filter_list):
# XXX this is [x for x in value_list if x in filter_list] # XXX this is [x for x in value_list if x in filter_list]
warn()
result = [] result = []
for k in value_list: for k in value_list:
if k in filter_list: if k in filter_list:
......
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