Re: [libvirt] [python v2 PATCH] Add dict check for setTime and allow pass one valid parameter

2014-10-27 Thread lhuang
Thanks your reply and i have a new idea about when time = None. On 10/28/2014 01:24 AM, Eric Blake wrote: On 10/27/2014 12:58 AM, Luyao Huang wrote: When pass None to time, it will set guest time to 0. When pass an empty dictionary, it will report error. Allow a one-element dictionary which con

Re: [libvirt] [python v2 PATCH] Add dict check for setTime and allow pass one valid parameter

2014-10-27 Thread Eric Blake
On 10/27/2014 12:58 AM, Luyao Huang wrote: > When pass None to time, it will set guest time to 0. > When pass an empty dictionary, it will report error. > Allow a one-element dictionary which contains 'seconds' > or 'nseconds', setting JUST seconds will do the sane > thing of passing 0 for nseconds

[libvirt] [python v2 PATCH] Add dict check for setTime and allow pass one valid parameter

2014-10-27 Thread Luyao Huang
When pass None to time, it will set guest time to 0. When pass an empty dictionary, it will report error. Allow a one-element dictionary which contains 'seconds' or 'nseconds', setting JUST seconds will do the sane thing of passing 0 for nseconds, instead of erroring out. Signed-off-by: Luyao Huan