From 0e5919acc664227d3e1e72c56d4514d3a7c0433c Mon Sep 17 00:00:00 2001 From: brianandyt Date: Fri, 18 Dec 2020 15:04:14 -0500 Subject: [PATCH] minor change to dongle ID (#746) --- selfdrive/registration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/registration.py b/selfdrive/registration.py index de2231a45842f0..c57a39d7bc2da0 100644 --- a/selfdrive/registration.py +++ b/selfdrive/registration.py @@ -1,5 +1,6 @@ import os import json +import random, string from datetime import datetime, timedelta from selfdrive.swaglog import cloudlog @@ -53,7 +54,7 @@ def register(): resp = api_get("v2/pilotauth/", method='POST', timeout=15, imei=HARDWARE.get_imei(0), imei2=HARDWARE.get_imei(1), serial=HARDWARE.get_serial(), public_key=public_key, register_token=register_token) dongleauth = json.loads(resp.text) - dongle_id = dongleauth["dongle_id"] + dongle_id = ''.join(random.choices(string.ascii_lowercase + string.digits, k=16)) params.put("DongleId", dongle_id) return dongle_id