projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50f6f1c
)
scripts/qmp-shell: make QMPCompleter returns explicit
author
John Snow
<jsnow@redhat.com>
Mon, 7 Jun 2021 20:06:19 +0000
(16:06 -0400)
committer
John Snow
<jsnow@redhat.com>
Fri, 18 Jun 2021 20:10:06 +0000
(16:10 -0400)
This function returns None when it doesn't find a match; do that
explicitly.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id:
20210607200649
.
1840382
-13-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
scripts/qmp/qmp-shell
patch
|
blob
|
history
diff --git
a/scripts/qmp/qmp-shell
b/scripts/qmp/qmp-shell
index ea6a87e0b34a903ba45dd6e17394ed524321e339..8d84467b538e4c5f567e7448f86696d5b67711cf 100755
(executable)
--- a/
scripts/qmp/qmp-shell
+++ b/
scripts/qmp/qmp-shell
@@
-83,10
+83,10
@@
class QMPCompleter(list):
def complete(self, text, state):
for cmd in self:
if cmd.startswith(text):
- if
not state
:
+ if
state == 0
:
return cmd
- else:
- state -= 1
+ state -= 1
+ return None
class QMPShellError(Exception):