From 8ddc95c069417ba64962ecf20e7642c680659d90 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 18 Jun 2024 12:06:36 -0400 Subject: [PATCH] Support for python 3.9 --- megaraid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/megaraid.py b/megaraid.py index 2bb566c..1130e5b 100644 --- a/megaraid.py +++ b/megaraid.py @@ -1,5 +1,6 @@ import json import re +from typing import Optional import smartprom @@ -57,7 +58,7 @@ def get_megaraid_device_type(dev: str, typ: str) -> str: return "sat" if results["device"]["protocol"] == "ATA" else "scsi" -def get_megaraid_device_id(typ: str) -> str | None: +def get_megaraid_device_id(typ: str) -> Optional[str]: """ Returns the device ID on the MegaRAID from the typ string """