Skip to content

Commit 77e5e33

Browse files
committed
logging
1 parent b96a012 commit 77e5e33

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

smct/multimonitortool.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def get_monitor_selection_list():
2222
_display_string = f"{_monitor_id} | {_monitor_name} | {_monitor_serial}"
2323
_monitor_selection_list.append(_display_string)
2424
log(f"Monitor detected: {_display_string}")
25-
_monitor_selection_list.sort()
25+
26+
_monitor_selection_list.sort()
2627
return _monitor_selection_list
2728

2829

@@ -42,28 +43,23 @@ def _run_mmt_command(command, destination):
4243
],
4344
check=True,
4445
)
46+
log(f"MultiMonitorTool.exe {command} {destination}")
4547
except subprocess.CalledProcessError as error:
4648
log(f"MultiMonitorTool.exe {command} {destination} failed: {error}")
4749

4850

4951
def save_mmt_config():
50-
_command = "/SaveConfig"
51-
log(f"MultiMonitorTool.exe {_command} {paths.MMT_CONFIG_PATH}")
5252
_run_mmt_command("/SaveConfig", paths.MMT_CONFIG_PATH)
5353

5454

5555
def enable_monitor():
56-
_command = "/LoadConfig"
57-
log(f"MultiMonitorTool.exe {_command} {paths.MMT_CONFIG_PATH}")
58-
_run_mmt_command(_command, paths.MMT_CONFIG_PATH)
56+
_run_mmt_command("/LoadConfig", paths.MMT_CONFIG_PATH)
5957

6058

6159
def disable_monitor():
62-
_command = "/disable"
6360
selected_monitor_id = get_selected_monitor_id()
6461
if selected_monitor_id:
65-
_run_mmt_command(_command, selected_monitor_id)
66-
log(f"MultiMonitorTool.exe {_command} {selected_monitor_id}")
62+
_run_mmt_command("/disable", selected_monitor_id)
6763
else:
6864
log("disable_monitor() - Can't find selected monitor id")
6965

0 commit comments

Comments
 (0)