mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
exit flashing scripts with error if no pandas
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user