Skip to content

Commit 023db8f

Browse files
committed
Update with buster and allow arguments for prompt_reboot
1 parent 758dbc0 commit 023db8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_shell.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def get_raspbian_version(self):
491491
"""Return a string containing the raspbian version"""
492492
if self.get_os() != "Raspbian":
493493
return None
494-
raspbian_releases = ("buster", "stretch", "jessie", "wheezy")
494+
raspbian_releases = ("bullseye", "buster", "stretch", "jessie", "wheezy")
495495
if os.path.exists("/etc/os-release"):
496496
with open("/etc/os-release", encoding="utf-8") as f:
497497
release_file = f.read()
@@ -502,9 +502,9 @@ def get_raspbian_version(self):
502502
return raspbian
503503
return None
504504

505-
def prompt_reboot(self):
505+
def prompt_reboot(self, default ="y", **kwargs):
506506
"""Prompt the user for a reboot"""
507-
if not self.prompt("REBOOT NOW?", default="y"):
507+
if not self.prompt("REBOOT NOW?", default=default, **kwargs):
508508
print("Exiting without reboot.")
509509
else:
510510
print("Reboot started...")

0 commit comments

Comments
 (0)