From 1d0a0014b008e5428fb63ed21109f70d39682661 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 24 Feb 2024 16:49:55 +0300 Subject: [PATCH] Style: Fix `flake8` error E722 bare 'except' --- xsetbg-wsgi.py | 2 +- xsetbg_db.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: -- 2.39.2