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

Re: [libvirt] [libvirt-sandbox][PATCH 2/2] Raise clear error message if no legacy configuration



On 08/09/2013 06:30 PM, Daniel P. Berrange wrote:
On Fri, Aug 09, 2013 at 06:26:47PM +0800, Alex Jia wrote:
Signed-off-by: Alex Jia<ajia redhat com>
---
  bin/virt-sandbox-service | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index 26b4a40..cb40f6a 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -965,6 +965,9 @@ def upgrade_config(args):
      configfile = get_legacy_config_path(args.name)
      if os.path.exists(configfile):
          upgrade_config_legacy(configfile)
+    else:
+        sys.stderr.write("No legacy '%s' configuration\n" % args.name)
+        sys.exit(1)
This isn't desired. This command is intended to be a no-op if nothing
needs changing. It is not just about upgrading from this legacy
config file layout. In the future I expet us to add more code here
as we make further changes. So it is right to silently exit with
success here, not report an error.

Ok, got it and thanks for your review.

Daniel


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