Generalise exception handling

This commit is contained in:
2022-08-20 14:47:46 +01:00
parent d9837246de
commit bcee2eedd0
15 changed files with 65 additions and 65 deletions

View File

@@ -9,7 +9,7 @@ from getpass import getpass
with app.app_context():
try: users = User.query.all()
except (SQLAlchemyError, ConnectionError) as exception: sys.exit('Database error:', exception)
except Exception 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.')