From 549a3a8f70686b1eb2e3a583c477482c94add605 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 6 Dec 2017 07:41:41 +0100 Subject: [PATCH] Improve hist_importer messages --- scripts/hist_importer.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/hist_importer.py b/scripts/hist_importer.py index 36f151e6f..ba3369f5c 100755 --- a/scripts/hist_importer.py +++ b/scripts/hist_importer.py @@ -66,9 +66,7 @@ def open_db(data_base): conn = sqlite3.connect(data_base) return conn else: - raise sys.exit('DataBaseNotFound: There was some error trying to to' - ' connect with the [{}] database. Verify if the' - ' given file path is correct.'.format(data_base)) + sys.exit('The file {} does not exist.'.format(data_base)) def extract(source, query): @@ -89,8 +87,8 @@ def extract(source, query): conn.close() return history except sqlite3.OperationalError as op_e: - print('\nCould not perform queries into the source database: {}' - .format(op_e)) + sys.exit('Could not perform queries on the source database: ' + '{}'.format(op_e)) def clean(history):