From 62d1d818b3f751534baae6b2fbc0a063e43d183c Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Mon, 24 Mar 2025 22:40:14 +0000 Subject: [PATCH] Restore use of ChainMap as well --- volatility3/framework/interfaces/objects.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/volatility3/framework/interfaces/objects.py b/volatility3/framework/interfaces/objects.py index 93c0ac16f..e1d36abb4 100644 --- a/volatility3/framework/interfaces/objects.py +++ b/volatility3/framework/interfaces/objects.py @@ -346,9 +346,8 @@ class Template: """Stores the keyword arguments for later object creation.""" # Allow the updating of template arguments whilst still in template form super().__init__() - self._vol = {"type_name": type_name} - self._vol.update(arguments) - self._vol = collections.ChainMap({}, self._vol) + vol = {"type_name": type_name}.update(arguments) + self._vol = collections.ChainMap({}, vol) @property def vol(self) -> ReadOnlyMapping: @@ -392,7 +391,7 @@ class Template: def clone(self) -> "Template": """Returns a copy of the original Template as constructed (without `update_vol` additions having been made)""" - clone = self.__class__(**self._vol) + clone = self.__class__(**self._vol.parents.new_child()) return clone def update_vol(self, **new_arguments) -> None: