Skip to content

Commit

Permalink
pre-commit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Nov 22, 2024
1 parent 7d2387d commit 8a9ac17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rosbot_utils/rosbot_utils/flash-firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,16 @@ def try_flash_operation(self, operation_name):
elif operation_name == "Read-UnProtection":
sh.stm32flash(self.port, "-k")
else:
raise("Unknown operation.")
raise ("Unknown operation.")
break
except Exception as e:
stderr = e.stderr.decode('utf-8')
stderr = e.stderr.decode("utf-8")
if stderr:
print(f"ERROR: {stderr.strip()}")

print("Success!")
self.exit_bootloader_mode()


def flash_firmware(self):
# Disable the flash write-protection
self.try_flash_operation("Write-UnProtection")
Expand Down

0 comments on commit 8a9ac17

Please sign in to comment.