Commit 63a43826 authored by Florent Guillaume's avatar Florent Guillaume

Don't warn when the ZGadflyDA is imported by Zope startup code.

parent 14637e80
......@@ -15,11 +15,14 @@
$Id$
"""
import warnings
warnings.warn('Using Gadfly and ZGadflyDA is deprecated. The module will be '
'removed in Zope 2.11)',
DeprecationWarning,
stacklevel=2)
# Don't warn when the product is imported by the startup code
import sys
if sys._getframe(1).f_code.co_name != 'import_product': # OFS.Application
import warnings
warnings.warn('Using Gadfly and ZGadflyDA is deprecated. '
'The module will be removed in Zope 2.11)',
DeprecationWarning,
stacklevel=2)
import Globals, os
......
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