@@ -145,13 +145,13 @@ def print_colored(message, color):
145
145
colorize = getattr (colored , color )
146
146
print (colorize (message ))
147
147
148
- def prompt (self , message , * , default = None , force_arg = None ):
148
+ def prompt (self , message , * , default = None , force_arg = None , force_arg_value = True ):
149
149
"""
150
150
A Yes/No prompt that accepts optional defaults
151
151
Returns True for Yes and False for No
152
152
"""
153
153
if force_arg is not None and self .argument_exists (force_arg ):
154
- return True
154
+ return force_arg_value
155
155
if default is None :
156
156
choicebox = "[y/n]"
157
157
else :
@@ -491,7 +491,7 @@ def get_raspbian_version(self):
491
491
"""Return a string containing the raspbian version"""
492
492
if self .get_os () != "Raspbian" :
493
493
return None
494
- raspbian_releases = ("buster" , "stretch" , "jessie" , "wheezy" )
494
+ raspbian_releases = ("bullseye" , " buster" , "stretch" , "jessie" , "wheezy" )
495
495
if os .path .exists ("/etc/os-release" ):
496
496
with open ("/etc/os-release" , encoding = "utf-8" ) as f :
497
497
release_file = f .read ()
@@ -502,9 +502,9 @@ def get_raspbian_version(self):
502
502
return raspbian
503
503
return None
504
504
505
- def prompt_reboot (self ):
505
+ def prompt_reboot (self , default = "y" , ** kwargs ):
506
506
"""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 ):
508
508
print ("Exiting without reboot." )
509
509
else :
510
510
print ("Reboot started..." )
0 commit comments