ia64/xen-unstable

changeset 11589:3499b3271e5f

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

Signed-off-by: Alastair Tse <atse@xensource.com>
Signed-off-by: Bryan D. Payne <bryan@thepaynes.cc>
author atse@norwich.uk.xensource.com
date Fri Sep 22 17:46:32 2006 +0100 (2006-09-22)
parents 92bfc59726a4
children bdace8da6319
files tools/python/xen/xm/dry-run.py
line diff
     1.1 --- a/tools/python/xen/xm/dry-run.py	Fri Sep 22 16:32:30 2006 +0100
     1.2 +++ b/tools/python/xen/xm/dry-run.py	Fri Sep 22 17:46:32 2006 +0100
     1.3 @@ -32,8 +32,9 @@ def help():
     1.4      individually along with the final security decision."""
     1.5  
     1.6  def main (argv):
     1.7 -    if len(argv) != 2:
     1.8 -        raise OptionError('Invalid number of arguments')
     1.9 +    try:
    1.10 +        if len(argv) != 2:
    1.11 +            raise OptionError('Invalid number of arguments')
    1.12  
    1.13          passed = 0
    1.14          (opts, config) = create.parseCommandLine(argv)
    1.15 @@ -42,7 +43,7 @@ def main (argv):
    1.16                  passed = 1
    1.17          else:
    1.18              print "Checking resources: (skipped)"
    1.19 -
    1.20 +                
    1.21          if passed:
    1.22              print "Dry Run: PASSED"
    1.23          else: