mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
daemon.on_stop: adapt to python 3.8
(py3.8 has breaking changes re asyncio.CancelledError and asyncio.TimeoutError)
follow-up 308517d473
This commit is contained in:
parent
c2d6a902dd
commit
47ab8f8dc5
1 changed files with 3 additions and 1 deletions
|
@ -32,6 +32,8 @@ import threading
|
|||
from typing import Dict, Optional, Tuple, Iterable
|
||||
from base64 import b64decode, b64encode
|
||||
from collections import defaultdict
|
||||
import concurrent
|
||||
from concurrent import futures
|
||||
|
||||
import aiohttp
|
||||
from aiohttp import web, client_exceptions
|
||||
|
@ -507,7 +509,7 @@ class Daemon(Logger):
|
|||
fut = asyncio.run_coroutine_threadsafe(self.taskgroup.cancel_remaining(), self.asyncio_loop)
|
||||
try:
|
||||
fut.result(timeout=2)
|
||||
except (asyncio.TimeoutError, asyncio.CancelledError):
|
||||
except (concurrent.futures.TimeoutError, concurrent.futures.CancelledError, asyncio.CancelledError):
|
||||
pass
|
||||
self.logger.info("removing lockfile")
|
||||
remove_lockfile(get_lockfile(self.config))
|
||||
|
|
Loading…
Add table
Reference in a new issue