Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enables the python code to run on Windows systems under python 3.8+ #34

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cbus/daemon/cmqttd.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.

from asyncio import get_event_loop, run
from asyncio import get_event_loop, run, set_event_loop_policy, WindowsSelectorEventLoopPolicy
import sys
from argparse import ArgumentParser, FileType
import json
import logging
from typing import Any, BinaryIO, Dict, Optional, Text, TextIO

import paho.mqtt.client as mqtt

if sys.platform == 'win32':
set_event_loop_policy(WindowsSelectorEventLoopPolicy())

try:
from serial_asyncio import create_serial_connection
except ImportError:
Expand Down