From e33288a05bd78e760d17f2a94c7949046d3b9986 Mon Sep 17 00:00:00 2001 From: Shreya Date: Thu, 6 May 2021 14:09:28 +0530 Subject: [PATCH] Remove unused property `locked` in `infection_monkey/system_singleton.py` --- monkey/infection_monkey/system_singleton.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/monkey/infection_monkey/system_singleton.py b/monkey/infection_monkey/system_singleton.py index 9576ff9f7..3bba2766f 100644 --- a/monkey/infection_monkey/system_singleton.py +++ b/monkey/infection_monkey/system_singleton.py @@ -11,11 +11,6 @@ LOG = logging.getLogger(__name__) class _SystemSingleton(object, metaclass=ABCMeta): - @property - @abstractmethod - def locked(self): - raise NotImplementedError() - @abstractmethod def try_lock(self): raise NotImplementedError() @@ -30,10 +25,6 @@ class WindowsSystemSingleton(_SystemSingleton): self._mutex_name = r"Global\%s" % (WormConfiguration.singleton_mutex_name,) self._mutex_handle = None - @property - def locked(self): - return self._mutex_handle is not None - def try_lock(self): 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._sock_handle = None - @property - def locked(self): - return self._sock_handle is not None - def try_lock(self): assert self._sock_handle is None, "Singleton already locked"