[libvirt] [sandbox][PATCH] Fix nits in virt-sandbox-service when raise ValueError
Alex Jia
ajia at redhat.com
Tue May 28 08:50:38 UTC 2013
On 05/28/2013 02:01 PM, Wayne Sun wrote:
> Put error msg in list when raise ValueError.
>
> This fix is for bug:
> [virt-sandbox-service] execute command with unsupported URI error msg is not right
> https://bugzilla.redhat.com/show_bug.cgi?id=967705
>
> Signed-off-by: Wayne Sun<gsun at redhat.com>
> ---
> bin/virt-sandbox-service | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
> index 4496b29..1db3c09 100755
> --- a/bin/virt-sandbox-service
> +++ b/bin/virt-sandbox-service
> @@ -878,7 +878,7 @@ def sandbox_list(args):
> def sandbox_reload(args):
> config = read_config(args.name)
> if isinstance(config, gi.repository.LibvirtSandbox.ConfigServiceGeneric):
> - raise ValueError(_("Generic Containers do not support reload"))
> + raise ValueError([_("Generic Containers do not support reload")])
> container = SystemdContainer(uri = args.uri, config = config)
> container.reload(args.unitfiles)
>
> @@ -931,7 +931,7 @@ def fullpath(cmd):
>
> def execute(args):
> if args.uri != "lxc:///":
> - raise ValueError(_("Can only execute commands inside of linux containers."))
> + raise ValueError([_("Can only execute commands inside of linux containers.")])
>
> myexec = [ "virsh", "-c", args.uri, "lxc-enter-namespace" ]
> # myexec = [ "virt-sandbox-service-util", "execute" ]
ACK.
More information about the libvir-list
mailing list