summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Byrum <clint@fewbar.com>2018-11-25 10:04:33 -0800
committerClint Byrum <clint@fewbar.com>2018-11-25 10:09:33 -0800
commit559f6152c646c8b9beb2e661487f6ea79b097479 (patch)
tree474eba4a04219c06aa2f4cc9aec76e8c7f3256f5
parentc20fef1dec8289e4d217852c8eeedc27c161e761 (diff)
Fix crash on python3
Python3 does not allow comparing int's to None directly. Change-Id: Id9e889284096e407d59c3938ecd07427ba42e350
Notes
Notes (review): Code-Review+1: Natal Ng├ętal <hobbestigrou@erakis.eu> Code-Review+1: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 29 Jan 2019 21:17:38 +0000 Reviewed-on: https://review.openstack.org/619938 Project: openstack/gertty Branch: refs/heads/master
-rw-r--r--gertty/mywid.py2
1 files changed, 1 insertions, 1 deletions
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):
438 pos = self.getPosAtCoords(maxcol, col, row) 438 pos = self.getPosAtCoords(maxcol, col, row)
439 index = 0 439 index = 0
440 for item, start, end in self.selectable_items: 440 for item, start, end in self.selectable_items:
441 if start <= pos <= end: 441 if pos is not None and start <= pos <= end:
442 return index 442 return index
443 index += 1 443 index += 1
444 return None 444 return None