WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xm: Fix xm block-detach error message dup

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: Fix xm block-detach error message duplication.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 01 Jul 2007 22:51:52 -0700
Delivery-date: Sun, 01 Jul 2007 22:50:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1183325127 -3600
# Node ID 5d7160564381eedda0853cf003b3097da0173893
# Parent  7a31e37fec9e222b37aec30e5063ea05c149efcd
xm: Fix xm block-detach error message duplication.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r 7a31e37fec9e -r 5d7160564381 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Sun Jul 01 22:23:16 2007 +0100
+++ b/tools/python/xen/xm/main.py       Sun Jul 01 22:25:27 2007 +0100
@@ -2168,9 +2168,7 @@ def xm_network_attach(args):
         server.xend.domain.device_create(dom, vif)
 
 
-def detach(args, command, deviceClass):
-    arg_check(args, command, 2, 3)
-
+def detach(args, deviceClass):
     dom = args[0]
     dev = args[1]
     try:
@@ -2204,12 +2202,13 @@ def xm_block_detach(args):
             raise OptionError("Cannot find device '%s' in domain '%s'"
                               % (dev,dom))
     else:
+        arg_check(args, 'block-detach', 2, 3)
         try:
-            detach(args, 'block-detach', 'vbd')
+            detach(args, 'vbd')
             return
         except:
             pass
-        detach(args, 'block-detach', 'tap')
+        detach(args, 'tap')
 
 def xm_network_detach(args):
     if serverType == SERVER_XEN_API:
@@ -2227,7 +2226,8 @@ def xm_network_detach(args):
         else:
             print "Cannot find device '%s' in domain '%s'" % (devid,dom)
     else:
-        detach(args, 'network-detach', 'vif')
+        arg_check(args, 'network-detach', 2, 3)
+        detach(args, 'vif')
 
 
 def xm_vnet_list(args):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm: Fix xm block-detach error message duplication., Xen patchbot-unstable <=