Skip to content

Commit

Permalink
Create set comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
Horofic committed Jan 2, 2025
1 parent 9132869 commit 2fa52c8
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions dissect/target/plugins/os/windows/log/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,7 @@ def errorlog(self) -> Iterator[MssqlErrorlogRecord]:
buf += line

def _find_instances(self) -> set[str, TargetPath]:
instances = set()

for subkey in self.target.registry.glob_ext(self.MSSQL_KEY_GLOB):
instances.add(
(
subkey.name,
self.target.fs.path(subkey.subkey("SQLServerAgent").value("ErrorLogFile").value).parent,
)
)
return instances
return {
(subkey.name, self.target.fs.path(subkey.subkey("SQLServerAgent").value("ErrorLogFile").value).parent)
for subkey in self.target.registry.glob_ext(self.MSSQL_KEY_GLOB)
}

0 comments on commit 2fa52c8

Please sign in to comment.