Skip to content

Commit 2b09464

Browse files
dougslandrbiasini
authored andcommitted
patches (#582)
* selfdrive: add sys module to exit call exit() is a helper for interactive shell. Let's explicit use the module sys. * selfdrive: tomstoned.py use constant for /data/tombstones/ Instead of use multiple times a string for the data dir, use a variable. old-commit-hash: 5a9d89e
1 parent 30f7a33 commit 2b09464

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

selfdrive/debug/dump.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def run_server(socketio):
3939
port = int(m)
4040
else:
4141
print("service not found")
42-
exit(-1)
42+
sys.exit(-1)
4343
sock = messaging.sub_sock(context, port, poller, addr=args.addr)
4444
if args.proxy:
4545
republish_socks[sock] = messaging.pub_sock(context, port)

selfdrive/tombstoned.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
from selfdrive.swaglog import cloudlog
1212

1313
def get_tombstones():
14-
return [("/data/tombstones/"+fn, int(os.stat("/data/tombstones/"+fn).st_ctime) )
15-
for fn in os.listdir("/data/tombstones") if fn.startswith("tombstone")]
14+
DIR_DATA = "/data/tombstones/"
15+
return [(DIR_DATA + fn, int(os.stat(DIR_DATA + fn).st_ctime) )
16+
for fn in os.listdir(DIR_DATA) if fn.startswith("tombstone")]
1617

1718
def report_tombstone(fn, client):
1819
mtime = os.path.getmtime(fn)

0 commit comments

Comments
 (0)