|
@@ -1,8 +1,6 @@
|
|
|
import pathlib
|
|
|
import typing
|
|
|
|
|
|
-import gpiod
|
|
|
-
|
|
|
ChipSelector = typing.Union[pathlib.Path, str, int]
|
|
|
|
|
|
|
|
@@ -12,7 +10,11 @@ def _format_chip_selector(selector: ChipSelector) -> str:
|
|
|
return str(selector)
|
|
|
|
|
|
|
|
|
-def get_line(chip_selector: ChipSelector, line_name: str) -> gpiod.line:
|
|
|
+def get_line(chip_selector: ChipSelector, line_name: str) -> "gpiod.line":
|
|
|
+
|
|
|
+
|
|
|
+ import gpiod
|
|
|
+
|
|
|
try:
|
|
|
chip = gpiod.chip(chip_selector)
|
|
|
except PermissionError as exc:
|