[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] QMP: Allow dot separated dict path arguments
From: |
Eric Blake |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
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 <address@hidden>
> + 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
signature.asc
Description: OpenPGP digital signature