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][ACM] Add try, catch back to main() f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XM][ACM] Add try, catch back to main() for dry-run
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Sep 2006 18:10:12 +0000
Delivery-date: Fri, 22 Sep 2006 11:10:53 -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 atse@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 3499b3271e5fd6d64ebc8b3c8db1f7c2070b3841
# Parent  92bfc59726a4ebfff76994bce9445cb93fce9f76
[XM][ACM] Add try,catch back to main() for dry-run

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
Signed-off-by: Bryan D. Payne <bryan@xxxxxxxxxxxx>
---
 tools/python/xen/xm/dry-run.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -r 92bfc59726a4 -r 3499b3271e5f tools/python/xen/xm/dry-run.py
--- a/tools/python/xen/xm/dry-run.py    Fri Sep 22 16:32:30 2006 +0100
+++ b/tools/python/xen/xm/dry-run.py    Fri Sep 22 17:46:32 2006 +0100
@@ -32,8 +32,9 @@ def help():
     individually along with the final security decision."""
 
 def main (argv):
-    if len(argv) != 2:
-        raise OptionError('Invalid number of arguments')
+    try:
+        if len(argv) != 2:
+            raise OptionError('Invalid number of arguments')
 
         passed = 0
         (opts, config) = create.parseCommandLine(argv)
@@ -42,7 +43,7 @@ def main (argv):
                 passed = 1
         else:
             print "Checking resources: (skipped)"
-
+                
         if passed:
             print "Dry Run: PASSED"
         else:

_______________________________________________
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][ACM] Add try, catch back to main() for dry-run, Xen patchbot-unstable <=