Skip to content

Commit c85026e

Browse files
committed
Core: Ensure people running renamed plugins know that the plugins are deprecated
1 parent fb76bf6 commit c85026e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

volatility3/framework/deprecation.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ def __init_subclass__(cls, replacement_class, removal_date, **kwargs):
133133
),
134134
)
135135
else:
136-
if not attr.startswith("__"):
136+
if attr == "run":
137+
setattr(
138+
cls,
139+
attr,
140+
method_being_removed(
141+
removal_date=removal_date,
142+
message=f"This plugin has been renamed, please call {replacement_class.__module__}.{replacement_class.__qualname__} rather than deprecated_class_name.",
143+
)(value),
144+
)
145+
elif not attr.startswith("__"):
137146
setattr(cls, attr, value)
138147
return super(PluginRenameClass).__init_subclass__(**kwargs)

0 commit comments

Comments
 (0)