Commit 35cadb66 authored by Roque's avatar Roque

CMFActivity: warnings for deprecated methods

parent bb4a3312
......@@ -859,8 +859,11 @@ class ActivityTool (Folder, UniqueObject):
"""
Backward-compatibility code only.
"""
LOG('ActivityTool', WARNING,
'"getServerAddress" class method is deprecated, use "getServerAddress" module-level function instead.')
warnings.warn(
'"getServerAddress" class method is deprecated, use "getServerAddress" module-level function instead.',
DeprecationWarning,
stacklevel=2,
)
return getServerAddress()
security.declareProtected(CMFCorePermissions.ManagePortal, 'getCurrentNode')
......@@ -868,8 +871,11 @@ class ActivityTool (Folder, UniqueObject):
"""
Backward-compatibility code only.
"""
LOG('ActivityTool', WARNING,
'"getCurrentNode" class method is deprecated, use "getCurrentNode" module-level function instead.')
warnings.warn(
'"getCurrentNode" class method is deprecated, use "getCurrentNode" module-level function instead.',
DeprecationWarning,
stacklevel=2,
)
return getCurrentNode()
security.declareProtected(CMFCorePermissions.ManagePortal, 'getDistributingNode')
......
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