Simulator processes return rc on exit
This change removes `exit`-ing from inner functions in favour of returning an rc up to the ultimate caller which will pass the rc back to the system. Change-Id: Ic36be34b71ea7c831b04e7babfed489db0f483df
This commit is contained in:
parent
195e6646f5
commit
3e4724fff9
|
@ -19,6 +19,7 @@ import argparse
|
|||
import functools
|
||||
import os
|
||||
import ssl
|
||||
import sys
|
||||
|
||||
import flask
|
||||
|
||||
|
@ -166,6 +167,8 @@ def main():
|
|||
|
||||
app.run(host='', port=args.port, ssl_context=ssl_context)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
sys.exit(main())
|
||||
|
|
|
@ -96,7 +96,7 @@ def main():
|
|||
args = parse_args()
|
||||
if not os.path.exists(args.mockup_files):
|
||||
print('Mockup files %s not found' % args.mockup_files)
|
||||
sys.exit(1)
|
||||
return 1
|
||||
|
||||
REDFISH_MOCKUP_FILES = os.path.realpath(args.mockup_files)
|
||||
httpd = http_server.HTTPServer(('', args.port), RequestHandler)
|
||||
|
@ -108,6 +108,8 @@ def main():
|
|||
|
||||
httpd.serve_forever()
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
sys.exit(main())
|
||||
|
|
Loading…
Reference in New Issue