Skip to content

Commit 3ebee83

Browse files
committed
Windows: psxview cleanup
Replaced this series of statements with a single invocation of the `all` builtin for brevity and conciseness.
1 parent 4b0ece0 commit 3ebee83

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

volatility3/framework/plugins/windows/psxview.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ def _proc_name_to_string(self, proc):
7575
"string", max_length=proc.ImageFileName.vol.count, errors="replace"
7676
)
7777

78-
def _is_valid_proc_name(self, str):
79-
for c in str:
80-
if not c in self.valid_proc_name_chars:
81-
return False
82-
return True
78+
def _is_valid_proc_name(self, string: str) -> bool:
79+
return all(c in self.valid_proc_name_chars for c in string)
8380

8481
def _filter_garbage_procs(
8582
self, proc_list: Iterable[extensions.EPROCESS]

0 commit comments

Comments
 (0)