[virt-tools-list] [virt-manager PATCH] virt-manager: show the manager when using a wrong domain id

Cole Robinson crobinso at redhat.com
Mon Nov 17 15:40:16 UTC 2014


On 11/17/2014 10:39 AM, Giuseppe Scrivano wrote:
> Cole Robinson <crobinso at redhat.com> writes:
>
>> On 11/17/2014 04:02 AM, Giuseppe Scrivano wrote:
>>> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1164691
>>>
>>> Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
>>> ---
>>>    virtManager/engine.py | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/virtManager/engine.py b/virtManager/engine.py
>>> index 4a9799d..16c54ab 100644
>>> --- a/virtManager/engine.py
>>> +++ b/virtManager/engine.py
>>> @@ -904,6 +904,7 @@ class vmmEngine(vmmGObject):
>>>            if not vm:
>>>                src.err.show_err("%s does not have VM '%s'" %
>>>                    (uri, clistr), modal=True)
>>> +            self.show_manager()
>>>                return
>>>
>>>            self._show_vm_helper(src, uri, vm, page, True)
>>>
>>
>> Actually I don't like this. If the user explicitly requests a VM on
>> the command line, and the VM doesn't exist, virt-manager should fail
>> to start IMO
>>
>> But it sounds like some fix is needed since the app doesn't correctly
>> exit, probably just replace show_manager() with app_exit() or whatever
>> the function is called
>
> I've done that way so that the user gets an error message of what is
> going wrong but I see that exit_app ensures the message is showed before
> exiting.
>
> OK to push this instead?
>
> diff --git a/virtManager/engine.py b/virtManager/engine.py
> index 4a9799d..8e9caeb 100644
> --- a/virtManager/engine.py
> +++ b/virtManager/engine.py
> @@ -904,6 +904,7 @@ class vmmEngine(vmmGObject):
>           if not vm:
>               src.err.show_err("%s does not have VM '%s'" %
>                   (uri, clistr), modal=True)
> +            self.exit_app(src.err)
>               return
>
>           self._show_vm_helper(src, uri, vm, page, True)
>
> Thanks,
> Giuseppe
>

ACK

- Cole




More information about the virt-tools-list mailing list