From 731f3224cf6cb823a7f09650c8ece67781200779 Mon Sep 17 00:00:00 2001 From: Roel de Jong <12800443+twiggler@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:14:59 +0100 Subject: [PATCH] refactor: remove value_or_empty which is no longer used --- dissect/target/plugins/os/windows/registry.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/dissect/target/plugins/os/windows/registry.py b/dissect/target/plugins/os/windows/registry.py index 861faf9a1..bf557f3cc 100644 --- a/dissect/target/plugins/os/windows/registry.py +++ b/dissect/target/plugins/os/windows/registry.py @@ -9,7 +9,6 @@ from dissect.target.exceptions import ( HiveUnavailableError, - RegistryError, RegistryKeyNotFoundError, RegistryValueNotFoundError, UnsupportedPluginError, @@ -292,17 +291,6 @@ def value(self, key: str, value: str) -> ValueCollection: """Convenience method for accessing a specific value.""" return self.key(key).value(value) - @internal - def value_or_empty(self, key: str, value: str) -> ValueCollection: - """Convenience method for trying to access a specific value. - - Returns a empty collection if the key or value does not exist. - """ - try: - return self.value(key, value) - except RegistryError: - return ValueCollection() - @internal def subkey(self, key: str, subkey: str) -> KeyCollection: """Convenience method for accessing a specific subkey."""