Re: [Autotest] [PATCH] KVM Test: Remove duplicated _close_sock function calls in kvm_monitor.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 4, 2011 at 4:19 AM,  <fyang@xxxxxxxxxx> wrote:
> From: Feng Yang <fyang@xxxxxxxxxx>
>
> self._close_sock will be called two times in HumanMonitor.__init__ and
> QMPMonitor.__init__ in exception.

Looks good to me, applied, thanks!

http://autotest.kernel.org/changeset/5521

> Signed-off-by: Feng Yang <fyang@xxxxxxxxxx>
> ---
>  client/virt/kvm_monitor.py |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/client/virt/kvm_monitor.py b/client/virt/kvm_monitor.py
> index 3980da8..c96f062 100644
> --- a/client/virt/kvm_monitor.py
> +++ b/client/virt/kvm_monitor.py
> @@ -174,7 +174,6 @@ class HumanMonitor(Monitor):
>             # Find the initial (qemu) prompt
>             s, o = self._read_up_to_qemu_prompt(20)
>             if not s:
> -                self._close_sock()
>                 raise MonitorProtocolError("Could not find (qemu) prompt "
>                                            "after connecting to monitor. "
>                                            "Output so far: %r" % o)
> @@ -432,7 +431,6 @@ class QMPMonitor(Monitor):
>             try:
>                 json
>             except NameError:
> -                self._close_sock()
>                 raise MonitorNotSupportedError("QMP requires the json module "
>                                                "(Python 2.6 and up)")
>
> @@ -447,7 +445,6 @@ class QMPMonitor(Monitor):
>                     break
>                 time.sleep(0.1)
>             else:
> -                self._close_sock()
>                 raise MonitorProtocolError("No QMP greeting message received")
>
>             # Issue qmp_capabilities
> --
> 1.7.1
>
> _______________________________________________
> Autotest mailing list
> Autotest@xxxxxxxxxxxxxxx
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>



-- 
Lucas
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux