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