From 04f7af0eb9e705e090dda8b13c7a976aa10a27d7 Mon Sep 17 00:00:00 2001 From: Schamper <1254028+Schamper@users.noreply.github.com> Date: Tue, 8 Aug 2023 00:14:10 +0200 Subject: [PATCH] Fix retrieving the root registry key --- dissect/target/plugins/os/windows/registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dissect/target/plugins/os/windows/registry.py b/dissect/target/plugins/os/windows/registry.py index a0084e808e..6ca95e43ea 100644 --- a/dissect/target/plugins/os/windows/registry.py +++ b/dissect/target/plugins/os/windows/registry.py @@ -2,7 +2,7 @@ import warnings from collections import defaultdict from functools import lru_cache -from typing import Iterator, Optional, Union +from typing import Iterator, Union from dissect.target.exceptions import HiveUnavailableError, RegistryKeyNotFoundError from dissect.target.helpers.fsutil import TargetPath @@ -204,7 +204,7 @@ def root(self) -> KeyCollection: @internal @lru_cache(4096) - def key(self, key: Optional[str] = None) -> KeyCollection: + def key(self, key: str = "") -> KeyCollection: """Query the virtual registry on the given key. Returns a KeyCollection which contains all keys that match