changeset 43228:0d609ed185ea

py3: prevent comparison with None in curses histedit (issue6196)
author Denis Laxalde <denis.laxalde@logilab.fr>
date Tue, 15 Oct 2019 12:14:44 +0200
parents f02d3c0eed18
children 9fa941faef94
files hgext/histedit.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Sat Oct 12 11:30:25 2019 -0700
+++ b/hgext/histedit.py	Tue Oct 15 12:14:44 2019 +0200
@@ -1259,7 +1259,7 @@
         return E_RESIZE
 
     lookup_ch = ch
-    if b'0' <= ch <= b'9':
+    if ch is not None and b'0' <= ch <= b'9':
         lookup_ch = b'0'
 
     curmode, prevmode = state[b'mode']