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 <f...@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
signature.asc
Description: OpenPGP digital signature