add comment if database is not imported
This commit is contained in:
parent
8bec9c7ce1
commit
d6bbcaa65c
@ -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__':
|
||||
|
Loading…
Reference in New Issue
Block a user