Replace exit() with sys.exit()

This fix adds replacement for exit() to sys.exit(), as
exit() is not recommended way to exit from the program.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde
2017-12-14 22:03:08 -05:00
committed by Brian Coca
parent 0ca828ebab
commit 36f82ae8cc
3 changed files with 10 additions and 13 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ def parse_args():
def query_database():
if not os.path.exists(DATABASE_PATH):
exit('error: Database not found. Did you run `report.py populate` first?')
sys.exit('error: Database not found. Did you run `report.py populate` first?')
os.execvp('sqlite3', ('sqlite3', DATABASE_PATH))