Re: [sandbox][PATCH] Fix nits in virt-sandbox-service when raise ValueError

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

 



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@xxxxxxxxxx>
---
  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.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]