diff --git a/script/database_manager.py b/script/database_manager.py index f4f754d..ec3f271 100644 --- a/script/database_manager.py +++ b/script/database_manager.py @@ -5,6 +5,7 @@ from os.path import isdir, join from sys import exit +from risotto.utils import _ from risotto.config import get_config @@ -21,7 +22,11 @@ async def main(): if filename.endswith('.sql'): sql_filename = join(sql_dir, filename) with open(sql_filename, 'r') as sql: - await connection.execute(sql.read()) + try: + await connection.execute(sql.read()) + except Exception as err: + print(_(f'unable to import {filename}: {err}')) + exit(1) if __name__ == '__main__':