Automatically download certificate on Python device
This commit is contained in:
@@ -72,3 +72,12 @@ if status == "Pending":
|
||||
exit(0)
|
||||
|
||||
print("Device is successfully enrolled!")
|
||||
|
||||
print("Check device certificate")
|
||||
if not os.path.isfile(args.dev_crt_path):
|
||||
print("Retrieve certificate...")
|
||||
cert = api.device_certificate()
|
||||
with open(args.dev_crt_path, "w") as f:
|
||||
f.write(cert)
|
||||
|
||||
print("Done. ready to operate.")
|
||||
Reference in New Issue
Block a user