From 5f06f15ad712c422deb4eb9ac01defa4d346144b Mon Sep 17 00:00:00 2001 From: caoyue Date: Mon, 25 Jan 2016 17:20:07 +0800 Subject: [PATCH] Replace exit() by sys.exit() exit() is used for interactive shell, it relies on the site module. sys.exit() is considered good to use in programs. Trivial-fix Change-Id: Ie05e4da082d6eae87c75200c78da68d9a18c19a7 --- cinder/cmd/manage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/cmd/manage.py b/cinder/cmd/manage.py index 116e436fc..5c8ab2bcb 100644 --- a/cinder/cmd/manage.py +++ b/cinder/cmd/manage.py @@ -171,7 +171,7 @@ def _db_error(caught_exception): print(_("The above error may show that the database has not " "been created.\nPlease create a database using " "'cinder-manage db sync' before running this command.")) - exit(1) + sys.exit(1) class HostCommands(object): @@ -226,7 +226,7 @@ class DbCommands(object): age_in_days = int(age_in_days) if age_in_days <= 0: print(_("Must supply a positive, non-zero value for age")) - exit(1) + sys.exit(1) ctxt = context.get_admin_context() db.purge_deleted_rows(ctxt, age_in_days) -- 2.45.2