From 91ad8d3229ad9be898cf7b7721bb546ced67e792 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 19 Nov 2025 11:02:48 -0800 Subject: [PATCH 1/2] Python 3.14 returns BlockingIOError instead of TypeError for read_stream --- adafruit_shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_shell.py b/adafruit_shell.py index 5184ce2..45b0236 100644 --- a/adafruit_shell.py +++ b/adafruit_shell.py @@ -115,7 +115,7 @@ def read_stream(output): fcntl.fcntl(file_descriptor, fcntl.F_SETFL, file_flags | os.O_NONBLOCK) try: return output.read() - except TypeError: + except (TypeError, BlockingIOError): return "" # Allow running as a different user if we are root From 3d7ee143c1b943cf650b0cab9ba3114739f7fcda Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 19 Nov 2025 11:12:34 -0800 Subject: [PATCH 2/2] Fix check for PiTop OS --- adafruit_shell.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adafruit_shell.py b/adafruit_shell.py index 45b0236..5554d50 100644 --- a/adafruit_shell.py +++ b/adafruit_shell.py @@ -640,11 +640,11 @@ def get_os(self): 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") - ): + if self.isdir("/etc/pi-top") or self.isdir("~/.config/pi-top"): + release = "PiTop" + if self.isdir("~/.kano-settings") or self.isdir("~/.kanoprofile"): release = "Kano" - if os.path.isdir(os.path.expanduser("~/.config/ubuntu-mate")): + if self.isdir("~/.config/ubuntu-mate"): release = "Mate" if platform.system() == "Darwin": release = "Darwin"