Skip to content

Commit 353f584

Browse files
committed
lora-sx126x,lora-sx127x: Add dependencies for sync/async modems.
The lora-sx126x and lora-sx127x packages create SyncModem and AsyncModem classes by importing from lora.sync_modem and lora.async_modem modules, which are provided by the lora-sync and lora-async extension packages respectively. However, the manifest.py files for these hardware driver packages did not require lora-sync or lora-async as dependencies. This meant that when users installed lora-sx126x or lora-sx127x, they would get the hardware driver but not the modem wrapper classes needed to actually use it. This commit adds the missing dependencies and increments the patch versions (0.1.5→0.1.6 for sx126x, 0.1.2→0.1.3 for sx127x), so users will receive the fixed packages. Also fixed error handling in lora/__init__.py where ImportError would be raised incorrectly when the second hardware driver import failed, even if the first one had succeeded. Signed-off-by: Breno RdV <[email protected]>
1 parent bdc4706 commit 353f584

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
metadata(version="0.1.5")
1+
metadata(version="0.1.6")
22
require("lora")
3+
require("lora-sync")
4+
require("lora-async")
35
package("lora")
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
metadata(version="0.1.2")
1+
metadata(version="0.1.3")
22
require("lora")
3+
require("lora-sync")
4+
require("lora-async")
35
package("lora")

micropython/lora/lora/lora/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
ok = True
2222
except ImportError as e:
23-
if "no module named 'lora." not in str(e):
23+
if "no module named 'lora." not in str(e) and not ok:
2424
raise
2525

2626
try:
2727
from .stm32wl5 import * # noqa: F401
2828

2929
ok = True
3030
except ImportError as e:
31-
if "no module named 'lora." not in str(e):
31+
if "no module named 'lora." not in str(e) and not ok:
3232
raise
3333

3434

0 commit comments

Comments
 (0)