From: Oleg Broytman Date: Sat, 24 Feb 2024 13:49:55 +0000 (+0300) Subject: Style: Fix `flake8` error E722 bare 'except' X-Git-Tag: 5.1.0~9 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=1d0a0014b008e5428fb63ed21109f70d39682661;p=xsetbg.git Style: Fix `flake8` error E722 bare 'except' --- diff --git a/xsetbg-wsgi.py b/xsetbg-wsgi.py index 5a435b4..161a2b5 100755 --- a/xsetbg-wsgi.py +++ b/xsetbg-wsgi.py @@ -65,7 +65,7 @@ def app(env, start_response): try: commands[command]() - except: + except Exception: status = '500 Error' response_headers = [('Content-type', 'text/plain')] start_response(status, response_headers) diff --git a/xsetbg_db.py b/xsetbg_db.py index 406ca96..dfa65fc 100755 --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -57,7 +57,7 @@ class SQLiteMassInsert(object): db_dirs = [] try: xsetbg_db_path = xsetbg_conf.get('xsetbg', 'database') -except: +except Exception: xsetbg_db_path = None if not xsetbg_db_path: