exit flashing scripts with error if no pandas

This commit is contained in:
Adeeb Shihadeh 2024-03-21 13:04:45 -07:00
parent 74e6a54503
commit cccceabf8a
4 changed files with 5 additions and 0 deletions

View File

@ -15,3 +15,4 @@ if __name__ == "__main__":
print("flashing", s)
with Panda(serial=s) as p:
p.flash()
exit(1 if len(serials) == 0 else 0)

View File

@ -15,3 +15,5 @@ if __name__ == "__main__":
print("flashing", s)
with PandaJungle(serial=s) as p:
p.flash()
exit(1 if len(serials) == 0 else 0)

View File

@ -24,3 +24,4 @@ if __name__ == "__main__":
for s in dfu_serials:
print("flashing", s)
PandaJungleDFU(s).recover()
exit(1 if len(dfu_serials) == 0 else 0)

View File

@ -24,3 +24,4 @@ if __name__ == "__main__":
for s in dfu_serials:
print("flashing", s)
PandaDFU(s).recover()
exit(1 if len(dfu_serials) == 0 else 0)