mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-07 17:25:40 +08:00
openpilot v0.6.5 release
This commit is contained in:
@@ -4,7 +4,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from selfdrive.version import version
|
||||
|
||||
class Api(object):
|
||||
class Api():
|
||||
def __init__(self, dongle_id):
|
||||
self.dongle_id = dongle_id
|
||||
with open('/persist/comma/id_rsa') as f:
|
||||
@@ -27,7 +27,7 @@ class Api(object):
|
||||
'iat': now,
|
||||
'exp': now + timedelta(hours=1)
|
||||
}
|
||||
return jwt.encode(payload, self.private_key, algorithm='RS256')
|
||||
return jwt.encode(payload, self.private_key, algorithm='RS256').decode('utf8')
|
||||
|
||||
def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
|
||||
backend = "https://api.commadotai.com/"
|
||||
|
||||
Reference in New Issue
Block a user