From 5831f9e5a0d74a03a1b6ebc7b87f6d76d0fc38ae Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 23 Jul 2023 11:54:51 -0700 Subject: [PATCH] common/gpio: switch to lru_cache for 3.8 compatiblity --- common/gpio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gpio.py b/common/gpio.py index f400ccc53a..e31c8c52e6 100644 --- a/common/gpio.py +++ b/common/gpio.py @@ -1,4 +1,4 @@ -from functools import cache +from functools import lru_cache from typing import Optional, List def gpio_init(pin: int, output: bool) -> None: @@ -25,7 +25,7 @@ def gpio_read(pin: int) -> Optional[bool]: return val -@cache +@lru_cache(maxsize=None) def get_irq_action(irq: int) -> List[str]: try: with open(f"/sys/kernel/irq/{irq}/actions") as f: