mirror of https://github.com/coddrago/Heroku
Add Orange Pi as platform to `utils.get_named_platform`
parent
6caa7a0e4e
commit
64163b7218
|
@ -581,7 +581,12 @@ def get_named_platform() -> str:
|
||||||
if os.path.isfile("/proc/device-tree/model"):
|
if os.path.isfile("/proc/device-tree/model"):
|
||||||
with open("/proc/device-tree/model") as f:
|
with open("/proc/device-tree/model") as f:
|
||||||
model = f.read()
|
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:
|
except Exception:
|
||||||
# In case of weird fs, aka Termux
|
# In case of weird fs, aka Termux
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue