From 559f6152c646c8b9beb2e661487f6ea79b097479 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Sun, 25 Nov 2018 10:04:33 -0800 Subject: [PATCH] Fix crash on python3 Python3 does not allow comparing int's to None directly. Change-Id: Id9e889284096e407d59c3938ecd07427ba42e350 --- gertty/mywid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gertty/mywid.py b/gertty/mywid.py index efa1f95..133d661 100644 --- a/gertty/mywid.py +++ b/gertty/mywid.py @@ -438,7 +438,7 @@ class HyperText(urwid.Text): pos = self.getPosAtCoords(maxcol, col, row) index = 0 for item, start, end in self.selectable_items: - if start <= pos <= end: + if pos is not None and start <= pos <= end: return index index += 1 return None