Commit 35cadb66 authored by Roque's avatar Roque

CMFActivity: warnings for deprecated methods

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