Skip to content

Commit 0cc4d66

Browse files
committed
provisioning: Write report before printing labels.
1 parent 46b49d1 commit 0cc4d66

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: provisioning/provision_stage_1.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -482,17 +482,18 @@ def main():
482482
raise Exception("exit 1")
483483

484484
result["tests_successful"] = True
485-
486-
run(["python3", "print-esp32-label.py", ssid, passphrase, "-c", "3"])
487-
label_success = input("Stick one label on the esp, put esp and the other two labels in the ESD bag. [y/n]")
488-
while label_success != "y" and label_success != "n":
489-
label_success = input("Stick one label on the esp, put esp and the other two labels in the ESD bag. [y/n]")
490-
result["labels_printed"] = label_success == "y"
491485
result["end"] = now()
492486

493487
with open("{}_{}_report_stage_1.json".format(ssid, now().replace(":", "-")), "w") as f:
494488
json.dump(result, f, indent=4)
495489

490+
label_success = "n"
491+
while label_success != "y":
492+
run(["python3", "print-esp32-label.py", ssid, passphrase, "-c", "3"])
493+
label_success = input("Stick one label on the esp, put esp and the other two labels in the ESD bag. Press n to retry printing the labels. [y/n]")
494+
while label_success != "y" and label_success != "n":
495+
input("Stick one label on the esp, put esp and the other two labels in the ESD bag. Press n to retry printing the labels. [y/n]]")
496+
496497
if __name__ == "__main__":
497498
try:
498499
main()

0 commit comments

Comments
 (0)