Skip to content

Commit

Permalink
refactor: remove value_or_empty which is no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
twiggler committed Jan 7, 2025
1 parent 5751d33 commit 731f322
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions dissect/target/plugins/os/windows/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from dissect.target.exceptions import (
HiveUnavailableError,
RegistryError,
RegistryKeyNotFoundError,
RegistryValueNotFoundError,
UnsupportedPluginError,
Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit 731f322

Please sign in to comment.