From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Igor Mammedov <imammedo@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] QMP: Allow dot separated dict path arguments in qmp-shell
Date: Tue, 11 Feb 2014 19:10:55 -0700 [thread overview]
Message-ID: <52FAD82F.4030204@redhat.com> (raw)
In-Reply-To: <1392168134-14789-1-git-send-email-famz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]
On 02/11/2014 06:22 PM, Fam Zheng wrote:
> As another convinience to allow using commands that expect a dict as
s/convinience/convenience/
> argument, this patch adds support for foo.bar=value syntax, similar to
> command line argument style:
>
> (QEMU) blockdev-add options.driver=file options.id=drive1 options.filename=...
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> + if type(d) is not dict:
> + raise QMPShellError('Can not use "%s" as both leaf and non-leaf key' % '.'.join(curpath))
s/Can not/Cannot/
> + parent[p] = d
> + parent = d
> + if optpath[-1] in parent:
> + if type(parent[optpath[-1]]) is dict:
> + raise QMPShellError('Can not use "%s" as both leaf and non-leaf key' % '.'.join(curpath))
> + else:
> + raise QMPShellError('Can not set "%s" for multiple times' % opt[0])
twice more. Also, s/for //
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2014-02-12 2:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 1:22 [Qemu-devel] [PATCH v2] QMP: Allow dot separated dict path arguments in qmp-shell Fam Zheng
2014-02-12 2:10 ` Eric Blake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52FAD82F.4030204@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=imammedo@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).