File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ def main_cli():
237237
238238 if not ports :
239239 print ("No device found" )
240- gui .popup (args . gui , "No device found" )
240+ gui .popup ("No device found" , gui = args . gui )
241241 sys .exit (1 )
242242 elif args .serial_dev is not None :
243243 filtered_devs = [
@@ -250,10 +250,10 @@ def main_cli():
250250 dev = ports [0 ]
251251 elif len (ports ) >= 1 and not args .gui :
252252 gui .popup (
253- args .gui ,
254253 "More than 1 compatibles devices found. Please choose from the commandline with --serial-dev COMX.\n Connected ports:\n - {}" .format (
255254 "\n - " .join ([port .device for port in ports ])
256255 ),
256+ gui = args .gui ,
257257 )
258258 print (
259259 "More than 1 compatible device found. Please choose with --serial-dev ..."
@@ -268,7 +268,7 @@ def main_cli():
268268
269269 if not args .gui and dev is None :
270270 print ("No device selected" )
271- gui .popup (args . gui , "No device selected" )
271+ gui .popup ("No device selected" , gui = args . gui )
272272 sys .exit (1 )
273273
274274 if args .bootloader :
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ def update_brightness_slider(devices):
4444 if average_brightness :
4545 brightness_scale .set (average_brightness )
4646
47- def popup (message ):
48- messagebox .showinfo ("Framework Laptop 16 LED Matrix" , message )
47+ def popup (message , gui = True ):
48+ if gui :
49+ messagebox .showinfo ("Framework Laptop 16 LED Matrix" , message )
4950
5051def run_gui (devices ):
5152 root = tk .Tk ()
You can’t perform that action at this time.
0 commit comments