Remove unused property `locked` in `infection_monkey/system_singleton.py`
This commit is contained in:
parent
962e785134
commit
e33288a05b
|
@ -11,11 +11,6 @@ LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class _SystemSingleton(object, metaclass=ABCMeta):
|
class _SystemSingleton(object, metaclass=ABCMeta):
|
||||||
@property
|
|
||||||
@abstractmethod
|
|
||||||
def locked(self):
|
|
||||||
raise NotImplementedError()
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def try_lock(self):
|
def try_lock(self):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
@ -30,10 +25,6 @@ class WindowsSystemSingleton(_SystemSingleton):
|
||||||
self._mutex_name = r"Global\%s" % (WormConfiguration.singleton_mutex_name,)
|
self._mutex_name = r"Global\%s" % (WormConfiguration.singleton_mutex_name,)
|
||||||
self._mutex_handle = None
|
self._mutex_handle = None
|
||||||
|
|
||||||
@property
|
|
||||||
def locked(self):
|
|
||||||
return self._mutex_handle is not None
|
|
||||||
|
|
||||||
def try_lock(self):
|
def try_lock(self):
|
||||||
assert self._mutex_handle is None, "Singleton already locked"
|
assert self._mutex_handle is None, "Singleton already locked"
|
||||||
|
|
||||||
|
@ -67,10 +58,6 @@ class LinuxSystemSingleton(_SystemSingleton):
|
||||||
self._unix_sock_name = str(WormConfiguration.singleton_mutex_name)
|
self._unix_sock_name = str(WormConfiguration.singleton_mutex_name)
|
||||||
self._sock_handle = None
|
self._sock_handle = None
|
||||||
|
|
||||||
@property
|
|
||||||
def locked(self):
|
|
||||||
return self._sock_handle is not None
|
|
||||||
|
|
||||||
def try_lock(self):
|
def try_lock(self):
|
||||||
assert self._sock_handle is None, "Singleton already locked"
|
assert self._sock_handle is None, "Singleton already locked"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue