mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[XM] Remove traceback printing from load/makepolicy.py.
Should pass the exception along to xm/main.py to handle properly like the rest of the commands. Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
665dff5cd1
commit
9a7d719155
2 files changed
+13
-19
No files matched your search
@@ -31,15 +31,12 @@ def main(argv):
|
||||
if len(argv) != 2:
|
||||
raise OptionError('No policy defined')
|
||||
|
||||
try:
|
||||
load_policy(argv[1])
|
||||
|
||||
except ACMError:
|
||||
sys.exit(-1)
|
||||
except:
|
||||
traceback.print_exc(limit = 1)
|
||||
load_policy(argv[1])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
|
||||
|
||||
try:
|
||||
main(sys.argv)
|
||||
except Exception, e:
|
||||
sys.stderr.write('Error: %s\n' % str(e))
|
||||
sys.exit(-1)
|
||||
|
||||
@@ -33,16 +33,13 @@ def main(argv):
|
||||
if len(argv) != 2:
|
||||
raise OptionError('No XML policy file specified')
|
||||
|
||||
try:
|
||||
make_policy(argv[1])
|
||||
except ACMError:
|
||||
sys.exit(-1)
|
||||
except:
|
||||
traceback.print_exc(limit=1)
|
||||
sys.exit(-1)
|
||||
|
||||
make_policy(argv[1])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
try:
|
||||
main(sys.argv)
|
||||
except Exception, e:
|
||||
sys.stderr.write('Error: %s\n' % str(e))
|
||||
sys.exit(-1)
|
||||
|
||||
|
||||