Skip to content

Commit

Permalink
minor change to dongle ID (commaai#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stupefacient authored Dec 18, 2020
1 parent a7989b2 commit 0e5919a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion selfdrive/registration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import json
import random, string

from datetime import datetime, timedelta
from selfdrive.swaglog import cloudlog
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e5919a

Please sign in to comment.