Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #76 from brianandyt/patch-7
Browse files Browse the repository at this point in the history
Dongle ID change
  • Loading branch information
rav4kumar authored Dec 11, 2020
2 parents 8e92f7c + 23fd46e commit 91c5fa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from common.params import Params
from common.file_helpers import mkdirs_exists_ok
from common.basedir import PERSIST

import random, string

def register():
params = Params()
Expand Down Expand Up @@ -53,7 +53,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 91c5fa6

Please sign in to comment.