aboutsummaryrefslogtreecommitdiff
path: root/scripts/qmp/qmp-shell
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qmp/qmp-shell')
-rwxr-xr-xscripts/qmp/qmp-shell6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index ea6a87e..8d84467 100755
--- 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):