From 023db8fc6ae35a1cb21f9b7eb70083c8f15ac6d1 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Mon, 7 Nov 2022 10:41:50 -0800 Subject: [PATCH] Update with buster and allow arguments for prompt_reboot --- adafruit_shell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_shell.py b/adafruit_shell.py index c39f23c..3d9884d 100644 --- a/adafruit_shell.py +++ b/adafruit_shell.py @@ -491,7 +491,7 @@ class Shell: """Return a string containing the raspbian version""" if self.get_os() != "Raspbian": return None - raspbian_releases = ("buster", "stretch", "jessie", "wheezy") + raspbian_releases = ("bullseye", "buster", "stretch", "jessie", "wheezy") if os.path.exists("/etc/os-release"): with open("/etc/os-release", encoding="utf-8") as f: release_file = f.read() @@ -502,9 +502,9 @@ class Shell: return raspbian return None - def prompt_reboot(self): + def prompt_reboot(self, default ="y", **kwargs): """Prompt the user for a reboot""" - if not self.prompt("REBOOT NOW?", default="y"): + if not self.prompt("REBOOT NOW?", default=default, **kwargs): print("Exiting without reboot.") else: print("Reboot started...")