Skip to content

Commit

Permalink
Bugfix for improperly formatted log files
Browse files Browse the repository at this point in the history
should only happen when non-eve log data is in eve log folder
  • Loading branch information
ArtificialQualia committed Jul 5, 2017
1 parent 4e0ebe5 commit fb27d41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PyEveLiveDPS/logreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def __init__(self, characterMenu):
oneDayAgo = datetime.datetime.utcnow() - datetime.timedelta(hours=24)
for filename in os.listdir(self.path):
timeString = filename.strip(".txt")
fileTime = datetime.datetime.strptime(timeString, "%Y%m%d_%H%M%S")
try:
fileTime = datetime.datetime.strptime(timeString, "%Y%m%d_%H%M%S")
except ValueError:
continue
if (fileTime >= oneDayAgo):
self.addLog(self.path + filename)

Expand Down

0 comments on commit fb27d41

Please sign in to comment.