Skip to content

Commit 3d7ee14

Browse files
committed
Fix check for PiTop OS
1 parent 91ad8d3 commit 3d7ee14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_shell.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,11 @@ def get_os(self):
640640
release = opsys
641641
if release == "Debian" and os.path.exists("/etc/rpi-issue"):
642642
release = "Raspbian"
643-
if os.path.isdir(os.path.expanduser("~/.kano-settings")) or os.path.isdir(
644-
os.path.expanduser("~/.kanoprofile")
645-
):
643+
if self.isdir("/etc/pi-top") or self.isdir("~/.config/pi-top"):
644+
release = "PiTop"
645+
if self.isdir("~/.kano-settings") or self.isdir("~/.kanoprofile"):
646646
release = "Kano"
647-
if os.path.isdir(os.path.expanduser("~/.config/ubuntu-mate")):
647+
if self.isdir("~/.config/ubuntu-mate"):
648648
release = "Mate"
649649
if platform.system() == "Darwin":
650650
release = "Darwin"

0 commit comments

Comments
 (0)