mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-05 07:49:10 -07:00
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:
parent
0ca828ebab
commit
36f82ae8cc
3 changed files with 10 additions and 13 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue