Skip to content

Commit 8fe21db

Browse files
Lazily import to help with testing
1 parent 9242651 commit 8fe21db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal_filesystem/lib/mpos/net/connectivity_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import time
66
import requests
77
import usocket
8-
from machine import Timer
98

109
try:
1110
import network
@@ -37,6 +36,7 @@ def __init__(self):
3736
self.is_connected = True # If there's no way to check, then assume we're always "connected" and online
3837

3938
# Start periodic validation timer (only on real embedded targets)
39+
from machine import Timer # Import Timer lazily to allow test mocks to be set up first
4040
self._check_timer = Timer(1) # 0 is already taken by task_handler.py
4141
self._check_timer.init(period=8000, mode=Timer.PERIODIC, callback=self._periodic_check_connected)
4242

0 commit comments

Comments
 (0)