Skip to content

Commit

Permalink
Merge pull request ForzaETH#10 from Seluba/dirFix
Browse files Browse the repository at this point in the history
Fixed FileNotFoundError
  • Loading branch information
eghignone authored Apr 29, 2024
2 parents af82487 + c0caf08 commit bce39c7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def __init__(self):

# Open up logfile
self.logfile_name = f"lap_analyzer_{datetime.now().strftime('%d%m_%H%M')}.txt"
self.logfile_dir = os.path.join(RosPack().get_path('lap_analyser'), 'data', self.logfile_name)
self.logfile_par = os.path.join(RosPack().get_path('lap_analyser'), 'data')
self.logfile_dir = os.path.join(self.logfile_par, self.logfile_name)
if not os.path.exists(self.logfile_par):
os.makedirs(self.logfile_par)
with open(self.logfile_dir, 'w') as f:
f.write(f"Laps done on " + datetime.now().strftime('%d %b %H:%M:%S') + '\n')

Expand Down

0 comments on commit bce39c7

Please sign in to comment.