Add Orange Pi as platform to `utils.get_named_platform`

pull/1/head
hikariatama 2022-05-19 19:02:13 +00:00
parent 6caa7a0e4e
commit 64163b7218
1 changed files with 6 additions and 1 deletions

View File

@ -581,7 +581,12 @@ def get_named_platform() -> str:
if os.path.isfile("/proc/device-tree/model"):
with open("/proc/device-tree/model") as f:
model = f.read()
return f"🍇 {model}" if model.startswith("Raspberry") else f"{model}"
if "Orange" in model:
return f"🍊 {model}"
elif "Raspberry" in model:
return f"🍇 {model}"
else:
return f"{model}"
except Exception:
# In case of weird fs, aka Termux
pass