Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mikahanninen committed Nov 21, 2023
1 parent e75dc89 commit 5f65ba5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rpaframework-core"
version = "11.2.3"
version = "11.3.0"
description = "Core utilities used by RPA Framework"
authors = ["RPA Framework <rpafw@robocorp.com>"]
license = "Apache-2.0"
Expand Down
7 changes: 5 additions & 2 deletions packages/core/src/RPA/core/windows/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
import psutil


def get_process_list() -> Dict:
def get_process_list(get_process_info: bool = True) -> Dict:
"""Get process list.
Returns dictionary mapping process id to process name
"""
return {proc.pid: proc.name() for proc in psutil.process_iter()}
if get_process_info:
return {proc.pid: proc.name() for proc in psutil.process_iter()}
else:
return {}
5 changes: 4 additions & 1 deletion packages/core/src/RPA/core/windows/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def get_fullpath(pid: int) -> str:

@method
def list_windows(
self, icons: bool = False, icon_save_directory: Optional[str] = None, get_process_info: bool = True
self,
icons: bool = False,
icon_save_directory: Optional[str] = None,
get_process_info: bool = True,
) -> List[Dict]:
windows = auto.GetRootControl().GetChildren()
process_list = get_process_list(get_process_info)
Expand Down

0 comments on commit 5f65ba5

Please sign in to comment.