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

[Xen-changelog] [xen-unstable] [XM][ACM] Add try, catch back to main() for dry-run



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.