aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-03-12 18:31:56 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-03-12 18:31:56 +0000
commit9d867123659ac32edd2a0b64cabe2dca544f1d0e (patch)
tree5c0913a438ea78cf1ad36867cdcdd06c69224178 /scripts
parentcfc3fef6b4e493bf1a7ee16790ad584e20dfbbd1 (diff)
parentb35203b227261961ff1da9b77b546c1919968bee (diff)
Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging
qmp-shell: fix nested json regression One small bug fix. # gpg: Signature made Tue 12 Mar 2019 02:16:24 GMT # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full] # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/python-next-pull-request: qmp-shell: fix nested json regression Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/qmp/qmp-shell4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 9fec46e2ed..7776c7b141 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -73,7 +73,7 @@ import sys
import os
import errno
import atexit
-import shlex
+import re
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
from qemu import qmp
@@ -222,7 +222,7 @@ class QMPShell(qmp.QEMUMonitorProtocol):
< command-name > [ arg-name1=arg1 ] ... [ arg-nameN=argN ]
"""
- cmdargs = shlex.split(cmdline)
+ cmdargs = re.findall(r'''(?:[^\s"']|"(?:\\.|[^"])*"|'(?:\\.|[^'])*')+''', cmdline)
# Transactional CLI entry/exit:
if cmdargs[0] == 'transaction(':