Skip to content

Commit

Permalink
Merge pull request #61 from arduino/fix_asyncio_imports
Browse files Browse the repository at this point in the history
ucloud: Fix asyncio imports to support recent upstream changes.
  • Loading branch information
iabdalkader authored Jul 17, 2023
2 parents c3221bf + ace013d commit 5f9ebfe
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/arduino_iot_cloud/ucloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
from senml import SenmlRecord
from arduino_iot_cloud.umqtt import MQTTClient

import asyncio
from asyncio import CancelledError
try:
import asyncio
from asyncio import CancelledError
from asyncio import InvalidStateError
except ImportError:
import uasyncio as asyncio
from uasyncio.core import CancelledError

except (ImportError, AttributeError):
# MicroPython doesn't have this exception
class InvalidStateError(Exception):
pass
Expand Down

0 comments on commit 5f9ebfe

Please sign in to comment.