Skip to content

Commit 34b21e3

Browse files
committed
Add print log
1 parent 6ac1b40 commit 34b21e3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/HwCodecDetect/run_tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,16 +812,22 @@ def get_launch_method():
812812
current_process = psutil.Process(os.getpid())
813813
parent = current_process.parent()
814814
if parent is None:
815+
print("launch_method: unknown")
815816
return "unknown"
817+
print("parent name:", parent.name())
816818
parent_name = parent.name().lower()
817819
shell_procs = ["cmd.exe", "powershell.exe", "pwsh.exe", "windows terminal", "wt.exe"]
818820
if parent_name == "explorer.exe" or "hwcodecdetect" in parent_name:
821+
print("launch_method: double_click")
819822
return "double_click"
820823
elif any(shell in parent_name for shell in shell_procs):
824+
print("launch_method: terminal")
821825
return "terminal"
822826
else:
827+
print("launch_method: other")
823828
return f"other ({parent_name})"
824829
except Exception as e:
830+
print(f"error: {e}")
825831
return f"error: {e}"
826832
else:
827833
import ctypes

0 commit comments

Comments
 (0)