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): ...@@ -1350,7 +1350,8 @@ def getExistingBaseCategoryList(portal, base_cat_list):
except KeyError: except KeyError:
value = category_tool._getOb(base_cat, None) value = category_tool._getOb(base_cat, None)
if value is 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 cache[key] = value
if value is not None: if value is not None:
new_base_cat_list.append(base_cat) new_base_cat_list.append(base_cat)
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# #
############################################################################## ##############################################################################
from zLOG import LOG import warnings
from interfaces.sql_expression import ISQLExpression from interfaces.sql_expression import ISQLExpression
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
from zope.interface import implements from zope.interface import implements
...@@ -132,7 +132,8 @@ class SQLExpression(object): ...@@ -132,7 +132,8 @@ class SQLExpression(object):
else: else:
self.limit = (limit, ) self.limit = (limit, )
if from_expression is not None: 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 self.from_expression = from_expression
@profiler_decorator @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