Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retrieving the root registry key #351

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Fix retrieving the root registry key #351

merged 2 commits into from
Aug 14, 2023

Conversation

Schamper
Copy link
Member

@Schamper Schamper commented Aug 7, 2023

Fixes #350

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #351 (f291ccc) into main (fb56483) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #351      +/-   ##
==========================================
+ Coverage   70.29%   70.40%   +0.11%     
==========================================
  Files         233      233              
  Lines       17944    17944              
==========================================
+ Hits        12613    12633      +20     
+ Misses       5331     5311      -20     
Flag Coverage Δ
unittests 70.40% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
dissect/target/plugins/os/windows/registry.py 79.80% <100.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a regression test for this please?

@@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use key: Optional[str] = None and use key = key or "" as the first line of the method?

@cecinestpasunepipe
Copy link
Contributor

LGTM

@Miauwkeru Miauwkeru merged commit 86a732e into main Aug 14, 2023
18 checks passed
@Miauwkeru Miauwkeru deleted the fix-registry-root branch August 14, 2023 09:23
Poeloe pushed a commit that referenced this pull request Feb 29, 2024
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows Registry error: retrieving the root registry key
4 participants