Skip to content

Commit 8688abd

Browse files
authored
Merge pull request commaai#386 from arne182/release2
update to latest release2
2 parents 5318da5 + fd69885 commit 8688abd

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,9 @@ selfdrive/test/tests/plant/out
3434
selfdrive/visiond/visiond
3535
selfdrive/visiond/visiond-normal
3636
/src/
37+
apk/ai.comma.plus.offroad.apk
38+
openpilot
39+
selfdrive/data_collection/df-data
40+
selfdrive/data_collection/gps-data
3741

3842
one

checkCustomAPK.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def waitForConnection():
3737

3838
if not path_exists:
3939
print "%s does not exist, installing" % apk_dir
40-
waitForconnection()
40+
waitForConnection()
4141
os.system("curl -L %s | python" % install_script)
4242
else:
4343
print "APK already installed"

selfdrive/crash.py

+13-18
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,30 @@ def install():
2121
from raven import Client
2222
from raven.transport.http import HTTPTransport
2323

24-
error_tags = {'dirty': dirty, 'branch': 'unknown'}
24+
error_tags = {'dirty': dirty, 'username': 'char_error'}
2525

2626
try:
2727
with open("/data/data/ai.comma.plus.offroad/files/persistStore/persist-auth", "r") as f:
2828
auth = json.loads(f.read())
2929
auth = json.loads(auth['commaUser'])
30-
try:
31-
error_tags['username'] = ''.join(char for char in auth['username'].decode('utf-8', 'ignore') if char.isalnum())
32-
except:
33-
error_tags['username'] = "char_error"
34-
try:
35-
error_tags['email'] = auth['email']
36-
except:
37-
pass
30+
tags = ['username', 'email']
31+
for tag in tags:
32+
try:
33+
error_tags[tag] = ''.join(char for char in auth[tag].decode('utf-8', 'ignore') if char.isalnum())
34+
except:
35+
pass
3836
except:
3937
pass
4038

4139
try:
4240
with open("/data/params/d/CommunityPilotUser", "r") as f:
4341
auth = json.loads(f.read())
44-
45-
try:
46-
error_tags['username'] = ''.join(char for char in auth['username'].decode('utf-8', 'ignore') if char.isalnum())
47-
except:
48-
error_tags['username'] = "char_error"
49-
try:
50-
error_tags['email'] = auth['email']
51-
except:
52-
pass
42+
tags = ['username', 'email']
43+
for tag in tags:
44+
try:
45+
error_tags[tag] = ''.join(char for char in auth[tag].decode('utf-8', 'ignore') if char.isalnum())
46+
except:
47+
pass
5348
except:
5449
pass
5550

0 commit comments

Comments
 (0)