File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,10 @@ def factory_serial(arg):
325325 default = datetime .now ().strftime ("%Y%m%dT%H%M%SZ" ),
326326 help = "serial number in ISO 8601 format (if not specified: %(default)s)" )
327327
328+ p_list = subparsers .add_parser (
329+ "list" , formatter_class = TextHelpFormatter ,
330+ help = "list devices connected to the system" )
331+
328332 return parser
329333
330334
@@ -439,6 +443,11 @@ async def _main():
439443 elif args .action == "factory" :
440444 device = GlasgowHardwareDevice (args .serial , firmware_filename ,
441445 _factory_rev = args .factory_rev )
446+ elif args .action == "list" :
447+ serial_list = GlasgowHardwareDevice .get_serial_list (firmware_filename )
448+ for serial in sorted (serial_list ):
449+ print (serial )
450+ return 0
442451 else :
443452 device = GlasgowHardwareDevice (args .serial , firmware_filename )
444453
You can’t perform that action at this time.
0 commit comments