Buroni/booksoup

Indexing using times less than two digits results in errors.

Closed this issue · 1 comments

In FBTime.py line 21 doesn't accommodate times that are not two digit times. Eg. 1pm is trying to index as 1:00, but the entry in the time list is 01:00. This code snippet replacing line 21 in FBTime.py solves the issue.

if len(hour) == 1:
  times["0"+hour+":00"] += 1
else:
  times[hour+":00"] += 1

@JorinRBM Cheers, there's actually a function __pad inside FBTime which does exactly this but I didn't think to apply it to the hour variable.