Exit code == 1 in case we died with an exception

This commit is contained in:
Nico Schottelius 2020-01-10 10:07:01 +01:00
parent 48efcdf08c
commit feb334cf04

View file

@ -40,7 +40,6 @@ if __name__ == '__main__':
if not args.command: if not args.command:
arg_parser.print_help() arg_parser.print_help()
else: else:
# if we start etcd in seperate process with default settings # if we start etcd in seperate process with default settings
# i.e inheriting few things from parent process etcd3 module # i.e inheriting few things from parent process etcd3 module
# errors out, so the following command configure multiprocessing # errors out, so the following command configure multiprocessing
@ -54,5 +53,7 @@ if __name__ == '__main__':
main(**arguments) main(**arguments)
except UncloudException as err: except UncloudException as err:
logger.error(err) logger.error(err)
sys.exit(1)
except Exception as err: except Exception as err:
logger.exception(err) logger.exception(err)
sys.exit(1)