From 608144d76f94433063de366fe2ef584a53135e24 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 9 Sep 2021 17:22:11 -0700 Subject: [PATCH] Add Raspberry Pi OS 64-bit Detection --- adafruit_shell.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/adafruit_shell.py b/adafruit_shell.py index f5c7ef1..d6fa997 100644 --- a/adafruit_shell.py +++ b/adafruit_shell.py @@ -441,6 +441,13 @@ class Shell: """ return platform.machine() == "armv8l" + @staticmethod + def is_arm64(): + """ + Check if Platform.machine() returns ARM 64 + """ + return platform.machine() == "aarch64" + @staticmethod def get_arch(): """Return a string containing the architecture""" @@ -470,6 +477,8 @@ class Shell: for opsys in os_releases: if opsys in release_file: release = opsys + if release == "Debian" and os.path.exists("/etc/rpi-issue"): + release = "Raspbian" if os.path.isdir(os.path.expanduser("~/.kano-settings")) or os.path.isdir( os.path.expanduser("~/.kanoprofile") ):