diff --git a/mistral/cmd/launch.py b/mistral/cmd/launch.py index c5ab76d64..422f28cc9 100644 --- a/mistral/cmd/launch.py +++ b/mistral/cmd/launch.py @@ -247,4 +247,4 @@ def main(): if __name__ == '__main__': - main() + sys.exit(main()) diff --git a/mistral/db/sqlalchemy/migration/cli.py b/mistral/db/sqlalchemy/migration/cli.py index 2df9a0720..e7f1e3cb3 100644 --- a/mistral/db/sqlalchemy/migration/cli.py +++ b/mistral/db/sqlalchemy/migration/cli.py @@ -21,6 +21,7 @@ from alembic import util as alembic_u from oslo_config import cfg from oslo_utils import importutils import six +import sys from mistral.services import action_manager from mistral.services import workflows @@ -129,4 +130,4 @@ def main(): CONF.command.func(config, CONF.command.name) if __name__ == '__main__': - main() + sys.exit(main()) diff --git a/mistral/engine/rpc_backend/kombu/examples/client.py b/mistral/engine/rpc_backend/kombu/examples/client.py index 7bdf3339c..bf4f024c6 100644 --- a/mistral/engine/rpc_backend/kombu/examples/client.py +++ b/mistral/engine/rpc_backend/kombu/examples/client.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys + from mistral.engine.rpc_backend.kombu import kombu_client @@ -39,4 +41,4 @@ def main(): if __name__ == '__main__': - main() + sys.exit(main()) diff --git a/mistral/engine/rpc_backend/kombu/examples/server.py b/mistral/engine/rpc_backend/kombu/examples/server.py index 119d5abc2..ceb828807 100644 --- a/mistral/engine/rpc_backend/kombu/examples/server.py +++ b/mistral/engine/rpc_backend/kombu/examples/server.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys + from mistral.engine.rpc_backend.kombu import kombu_server @@ -48,4 +50,4 @@ def main(): if __name__ == '__main__': - main() + sys.exit(main()) diff --git a/tools/sync_db.py b/tools/sync_db.py index 6590cb950..1f84db026 100644 --- a/tools/sync_db.py +++ b/tools/sync_db.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys + import keystonemiddleware.opts as keystonemw_opts from oslo_config import cfg from oslo_log import log as logging @@ -49,4 +51,4 @@ def main(): if __name__ == '__main__': - main() + sys.exit(main())