Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
1 parent
f8651d9faa
commit
f49ce5d1b4
21 files changed
+387
-244
No files matched your search
@@ -7,6 +7,7 @@ import os
|
||||
import sys
|
||||
from typing import List, Optional, Sequence, Text
|
||||
|
||||
from homeassistant import runner
|
||||
from homeassistant.bootstrap import async_mount_local_lib_path
|
||||
from homeassistant.config import get_default_config_dir
|
||||
from homeassistant.requirements import pip_kwargs
|
||||
@@ -59,6 +60,8 @@ def run(args: List) -> int:
|
||||
print("Aborting script, could not install dependency", req)
|
||||
return 1
|
||||
|
||||
asyncio.set_event_loop_policy(runner.HassEventLoopPolicy(False))
|
||||
|
||||
return script.run(args[1:]) # type: ignore
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user