Skip to content

Commit b829e04

Browse files
committed
remove execution blocking from macos.py, move macos permission check in main.py after logging has bene initialized
1 parent 3ad2af6 commit b829e04

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

aw_watcher_window/macos.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def background_ensure_permissions() -> None:
2121
from multiprocessing import Process
2222
permission_process = Process(target=ensure_permissions, args=(()))
2323
permission_process.start()
24-
permission_process.join()
2524
return
2625

2726

aw_watcher_window/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ def main():
2727
if sys.platform.startswith("linux") and ("DISPLAY" not in os.environ or not os.environ["DISPLAY"]):
2828
raise Exception("DISPLAY environment variable not set")
2929

30+
setup_logging(name="aw-watcher-window", testing=args.testing, verbose=args.verbose,
31+
log_stderr=True, log_file=True)
32+
3033
if sys.platform == "darwin":
3134
from . import macos
3235
macos.background_ensure_permissions()
3336

34-
setup_logging(name="aw-watcher-window", testing=args.testing, verbose=args.verbose,
35-
log_stderr=True, log_file=True)
36-
3737
client = ActivityWatchClient("aw-watcher-window", testing=args.testing)
3838

3939
bucket_id = "{}_{}".format(client.client_name, client.client_hostname)

0 commit comments

Comments
 (0)