Skip to content

Commit f728f5b

Browse files
committed
Also check for Keystroke's code in query_mode()
The attribute may be None.
1 parent 0db6fec commit f728f5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pgactivity/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def query_mode(key: Keystroke) -> QueryMode | None:
7878
>>> query_mode(k(code=curses.KEY_F3)).name
7979
'blocking'
8080
"""
81-
if key.is_sequence:
81+
if key.is_sequence and key.code:
8282
try:
8383
return keys.QUERYMODE_FROM_KEYS[key.code]
8484
except KeyError:

0 commit comments

Comments
 (0)