From 5a0de9fd25d783039345674680c67a2bd91815a5 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 7 May 2015 11:21:02 -0300 Subject: [feat] adapt to new events api on common - Related: #6359 --- src/leap/bitmask/platform_init/locks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/leap/bitmask/platform_init') diff --git a/src/leap/bitmask/platform_init/locks.py b/src/leap/bitmask/platform_init/locks.py index ac45a5ce..eff900fa 100644 --- a/src/leap/bitmask/platform_init/locks.py +++ b/src/leap/bitmask/platform_init/locks.py @@ -23,8 +23,7 @@ import os import platform from leap.bitmask.platform_init import IS_WIN, IS_UNIX -from leap.common.events import signal as signal_event -from leap.common.events import events_pb2 as proto +from leap.common.events import emit, catalog if IS_UNIX: from fcntl import flock, LOCK_EX, LOCK_NB @@ -364,7 +363,7 @@ def we_are_the_one_and_only(): locker.get_lock() we_are_the_one = locker.locked_by_us if not we_are_the_one: - signal_event(proto.RAISE_WINDOW) + emit(catalog.RAISE_WINDOW) return we_are_the_one elif IS_WIN: @@ -385,7 +384,7 @@ def we_are_the_one_and_only(): # let's assume it's a stalled lock we_are_the_one = True - signal_event(proto.RAISE_WINDOW) + emit(catalog.RAISE_WINDOW) while check_interval(): if get_modification_ts(lock_path) > ts: -- cgit v1.2.3