Skip to content

Commit

Permalink
Merge pull request commaai#761 from arne182/DP08-clean
Browse files Browse the repository at this point in the history
Update dp_common.py
  • Loading branch information
arne182 authored Jan 9, 2021
2 parents c65fe59 + 97c668b commit 476575c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions common/dp_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
from common.params import Params
from common.realtime import sec_since_boot
import os
import time
from math import floor
#import time
#from math import floor
params = Params()
from common.travis_checker import travis
from common.dp_conf import init_params_vals
#from common.dp_conf import init_params_vals

if travis:
PARAM_PATH = str(os.environ.get('HOME')) + "/.comma/params/d/"
else:
PARAM_PATH = "/data/params/d/"
LAST_MODIFIED = str(PARAM_PATH) + "dp_last_modified"
if not os.path.exists(LAST_MODIFIED):
os.makedirs(str(os.environ.get('HOME')) + "/.comma/params/d/", exist_ok=True)
print("dp_last_modified is " + str(floor(time.time())))
params.put('dp_last_modified',str(floor(time.time())))
init_params_vals(params)
#if not os.path.exists(LAST_MODIFIED):
# os.makedirs(str(os.environ.get('HOME')) + "/.comma/params/d/", exist_ok=True)
# print("dp_last_modified is " + str(floor(time.time())))
# params.put('dp_last_modified',str(floor(time.time())))
# init_params_vals(params)

def is_online():
try:
Expand Down

0 comments on commit 476575c

Please sign in to comment.