Include connection errors in exception handling

This commit is contained in:
2022-08-20 12:58:47 +01:00
parent 168b2b288a
commit 72f2af1df8
15 changed files with 63 additions and 68 deletions

View File

@@ -9,8 +9,7 @@ from getpass import getpass
with app.app_context():
try: users = User.query.all()
except SQLAlchemyError as exception:
sys.exit('Database error:', exception)
except (SQLAlchemyError, ConnectionError) as exception: sys.exit('Database error:', exception)
print('')
print('This interface will allow you to override the password for an administrator account.')
print('To exit this interface, press Ctrl + C.')