Commit 1895fa10 authored by Andreas Jung's avatar Andreas Jung

No commit message

No commit message
parent c10f3963
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
$Id$ $Id$
""" """
from warnings import warn
import urllib, time, sys, string,logging import urllib, time, sys, string,logging
from Globals import DTMLFile, MessageDialog from Globals import DTMLFile, MessageDialog
...@@ -501,11 +502,18 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -501,11 +502,18 @@ class ZCatalog(Folder, Persistent, Implicit):
# products like CMF 1.4.2 and earlier that subclass from # products like CMF 1.4.2 and earlier that subclass from
# ZCatalog and don't support the update_metadata argument. # ZCatalog and don't support the update_metadata argument.
# May be removed some day. # May be removed some day.
from warnings import warn
warn('catalog_object interface of %s not up to date' warn('catalog_object interface of %s not up to date'
% self.__class__.__name__, % self.__class__.__name__,
DeprecationWarning) DeprecationWarning)
try:
self.catalog_object(obj, p, idxs=name, pghandler=pghandler) self.catalog_object(obj, p, idxs=name, pghandler=pghandler)
except TypeError:
# Fall back to pre-Zope 2.8 interface where there is no
# 'pghandler' argument.
warn('catalog_object interface of %s not up to date'
% self.__class__.__name__,
DeprecationWarning)
self.catalog_object(obj, p, idxs=name)
if pghandler: if pghandler:
pghandler.finish() pghandler.finish()
......
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