1
0
Fork 0

python3 compatibility

This commit is contained in:
boyska 2017-05-07 00:15:46 +02:00 committed by dbz
parent e16ba4ee2f
commit 4c6d21d006

View file

@ -182,7 +182,7 @@ class TalkGridDirective(Directive):
rooms = tuple(sorted(unique_attr(talks, 'room')))
mintime = min({talk['time'].hour * 60 +
talk['time'].minute
for talk in talks}) / GRID_STEP * GRID_STEP
for talk in talks}) // GRID_STEP * GRID_STEP
maxtime = max({talk['time'].hour * 60 +
talk['time'].minute +
talk['duration']
@ -197,7 +197,7 @@ class TalkGridDirective(Directive):
assert position in times
roomnum = rooms.index(talk['room'])
times[position][roomnum] = talk
for i in range(1, talk['duration'] / GRID_STEP):
for i in range(1, talk['duration'] // GRID_STEP):
times[position + i*GRID_STEP][roomnum] = 'skip'
render = tmpl.render(times=times,