mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-04-08 07:03:56 +08:00
windows: fix fcntl import (#2329)
* windows: fix fcntl import * fix indentation * add windows ci * make sure CI catches import error * Revert "make sure CI catches import error" This reverts commit b18043ac767f64dd544582931b7b0d29c4c478f3.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import binascii
|
||||
import os
|
||||
import fcntl
|
||||
import math
|
||||
import time
|
||||
import struct
|
||||
@@ -12,6 +11,13 @@ from .base import BaseHandle, BaseSTBootloaderHandle, TIMEOUT
|
||||
from .constants import McuType, MCU_TYPE_BY_IDCODE, USBPACKET_MAX_SIZE
|
||||
from .utils import logger
|
||||
|
||||
# No fcntl on Windows
|
||||
try:
|
||||
import fcntl
|
||||
except ImportError:
|
||||
fcntl = None # type: ignore
|
||||
|
||||
# No spidev on MacOS/Windows
|
||||
try:
|
||||
import spidev
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user