File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ v0.2.3, 2022-04-06 Fixed CLI asyncio error for Windows systems.
12v0.2.2, 2022-04-05 [BREAKING] Moved action functions from controller to individual devices.
23 Added support for lights.
34 Fixed OTP login workflow in CLI.
Original file line number Diff line number Diff line change 3838from .errors import UnexpectedDataStructure
3939from .errors import UnsupportedDevice
4040
41- __version__ = "0.2.2 "
41+ __version__ = "0.2.3 "
4242
4343
4444log = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 44Based on https://github.com/uvjustin/pyalarmdotcomajax/pull/16 by Kevin David (@kevin-david)
55"""
66from __future__ import annotations
7+ import platform
78
89import argparse
910import asyncio
1011import logging
1112import sys
1213
1314import aiohttp
15+ from attr import has
1416import pyalarmdotcomajax
1517from pyalarmdotcomajax .errors import AuthenticationFailed
1618from pyalarmdotcomajax .errors import DataFetchFailed
@@ -322,4 +324,11 @@ def _print_element_tearsheet(
322324
323325def main () -> None :
324326 """Run primary CLI function via asyncio. Main entrypoint for command line tool."""
327+
328+ # Below is necessary to prevent asyncio "Event loop is closed" error in Windows.
329+ if platform .system () == "Windows" and hasattr (
330+ asyncio , "WindowsSelectorEventLoopPolicy"
331+ ):
332+ asyncio .set_event_loop_policy (asyncio .WindowsSelectorEventLoopPolicy ()) # type: ignore
333+
325334 asyncio .run (cli ())
You can’t perform that action at this time.
0 commit comments