1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Return a error on update with own version (#124)

Return a error on update with own version
This commit is contained in:
Pascal Vizeli
2017-08-02 16:59:38 +02:00
committed by GitHub
parent 3809f20c6a
commit 8afde1e881
7 changed files with 92 additions and 51 deletions

View File

@@ -111,10 +111,13 @@ class APISnapshots(object):
self.snapshots.do_snapshot_partial(**body), loop=self.loop)
@api_process
async def restore_full(self, request):
"""Full-Restore a snapshot."""
def restore_full(self, request):
"""Full-Restore a snapshot.
Return a coroutine.
"""
snapshot = self._extract_snapshot(request)
return await asyncio.shield(
return asyncio.shield(
self.snapshots.do_restore_full(snapshot), loop=self.loop)
@api_process
@@ -125,7 +128,8 @@ class APISnapshots(object):
return await asyncio.shield(
self.snapshots.do_restore_partial(snapshot, **body),
loop=self.loop)
loop=self.loop
)
@api_process
async def remove(self, request):