From 522f68bf68cba97651eb7510a3c86586bd18dedf Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 21 May 2020 12:01:21 +0200 Subject: [PATCH] Remove passing in deprecated loop arguments (#1733) --- supervisor/docker/interface.py | 2 +- supervisor/homeassistant.py | 2 +- supervisor/snapshots/__init__.py | 2 +- supervisor/store/git.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/supervisor/docker/interface.py b/supervisor/docker/interface.py index 72c277262..d355edcef 100644 --- a/supervisor/docker/interface.py +++ b/supervisor/docker/interface.py @@ -23,7 +23,7 @@ class DockerInterface(CoreSysAttributes): """Initialize Docker base wrapper.""" self.coresys: CoreSys = coresys self._meta: Optional[Dict[str, Any]] = None - self.lock: asyncio.Lock = asyncio.Lock(loop=coresys.loop) + self.lock: asyncio.Lock = asyncio.Lock() @property def timeout(self) -> str: diff --git a/supervisor/homeassistant.py b/supervisor/homeassistant.py index d1c6aede9..779b7c2f9 100644 --- a/supervisor/homeassistant.py +++ b/supervisor/homeassistant.py @@ -67,7 +67,7 @@ class HomeAssistant(JsonConfig, CoreSysAttributes): super().__init__(FILE_HASSIO_HOMEASSISTANT, SCHEMA_HASS_CONFIG) self.coresys: CoreSys = coresys self.instance: DockerHomeAssistant = DockerHomeAssistant(coresys) - self.lock: asyncio.Lock = asyncio.Lock(loop=coresys.loop) + self.lock: asyncio.Lock = asyncio.Lock() self._error_state: bool = False # We don't persist access tokens. Instead we fetch new ones when needed diff --git a/supervisor/snapshots/__init__.py b/supervisor/snapshots/__init__.py index 64c5c8c45..43ad53294 100644 --- a/supervisor/snapshots/__init__.py +++ b/supervisor/snapshots/__init__.py @@ -19,7 +19,7 @@ class SnapshotManager(CoreSysAttributes): """Initialize a snapshot manager.""" self.coresys = coresys self.snapshots_obj = {} - self.lock = asyncio.Lock(loop=coresys.loop) + self.lock = asyncio.Lock() @property def list_snapshots(self): diff --git a/supervisor/store/git.py b/supervisor/store/git.py index 9a2cce642..fa07ad045 100644 --- a/supervisor/store/git.py +++ b/supervisor/store/git.py @@ -23,7 +23,7 @@ class GitRepo(CoreSysAttributes): self.coresys = coresys self.repo = None self.path = path - self.lock = asyncio.Lock(loop=coresys.loop) + self.lock = asyncio.Lock() self.data = RE_REPOSITORY.match(url).groupdict()