[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:
atse@norwich.uk.xensource.com committed 2006-09-28 12:29:52 +01:00
1 parent 665dff5cd1
commit 9a7d719155
2 files changed
+13 -19

No files matched your search

+7 -10
View File
@@ -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)
+6 -9
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.