Commit 0b0607b7 authored by Julien Muchembled's avatar Julien Muchembled

Change 2 common warnings so that they are reported only once per instance

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39197 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 54e1f1cc
......@@ -1350,7 +1350,8 @@ def getExistingBaseCategoryList(portal, base_cat_list):
except KeyError:
value = category_tool._getOb(base_cat, None)
if value is None:
LOG('ERP5Type.Utils.getExistingBaseCategoryList', PROBLEM, 'base_category "%s" is missing, can not generate Accessors' % (base_cat))
warnings.warn("Base Category %r is missing."
" Accessors can not be generated." % base_cat, Warning)
cache[key] = value
if value is not None:
new_base_cat_list.append(base_cat)
......
......@@ -27,7 +27,7 @@
#
##############################################################################
from zLOG import LOG
import warnings
from interfaces.sql_expression import ISQLExpression
from zope.interface.verify import verifyClass
from zope.interface import implements
......@@ -132,7 +132,8 @@ class SQLExpression(object):
else:
self.limit = (limit, )
if from_expression is not None:
LOG('SQLExpression', 0, 'Providing a from_expression is deprecated.')
warnings.warn("Providing a 'from_expression' is deprecated.",
DeprecationWarning)
self.from_expression = from_expression
@profiler_decorator
......
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