Skip to content

Commit

Permalink
remove execution blocking from macos.py, move macos permission check …
Browse files Browse the repository at this point in the history
…in main.py after logging has bene initialized
  • Loading branch information
xylix committed Apr 25, 2020
1 parent 3ad2af6 commit b829e04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion aw_watcher_window/macos.py
Expand Up @@ -21,7 +21,6 @@ def background_ensure_permissions() -> None:
from multiprocessing import Process
permission_process = Process(target=ensure_permissions, args=(()))
permission_process.start()
permission_process.join()
return


Expand Down
6 changes: 3 additions & 3 deletions aw_watcher_window/main.py
Expand Up @@ -27,13 +27,13 @@ def main():
if sys.platform.startswith("linux") and ("DISPLAY" not in os.environ or not os.environ["DISPLAY"]):
raise Exception("DISPLAY environment variable not set")

setup_logging(name="aw-watcher-window", testing=args.testing, verbose=args.verbose,
log_stderr=True, log_file=True)

if sys.platform == "darwin":
from . import macos
macos.background_ensure_permissions()

setup_logging(name="aw-watcher-window", testing=args.testing, verbose=args.verbose,
log_stderr=True, log_file=True)

client = ActivityWatchClient("aw-watcher-window", testing=args.testing)

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

0 comments on commit b829e04

Please sign in to comment.