Fix crash on python3
Python3 does not allow comparing int's to None directly. Change-Id: Id9e889284096e407d59c3938ecd07427ba42e350
This commit is contained in:
parent
c20fef1dec
commit
559f6152c6
|
@ -438,7 +438,7 @@ class HyperText(urwid.Text):
|
||||||
pos = self.getPosAtCoords(maxcol, col, row)
|
pos = self.getPosAtCoords(maxcol, col, row)
|
||||||
index = 0
|
index = 0
|
||||||
for item, start, end in self.selectable_items:
|
for item, start, end in self.selectable_items:
|
||||||
if start <= pos <= end:
|
if pos is not None and start <= pos <= end:
|
||||||
return index
|
return index
|
||||||
index += 1
|
index += 1
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue