cbwinflash = CBWinFlash() cbwinflash.detect_device() if cbwinflash.dev is not None: cbwinflash.update_firmware(args.firmware)