diff options
| author | Magnus Hagander | 2020-07-16 13:46:51 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2020-08-11 10:19:47 +0000 |
| commit | f4c23c41e7500f4c4f46fb81a0cfffe54f2f7a08 (patch) | |
| tree | 97b1664fecfbf75b1e2b9db9b6a08736881ca365 /django/archives/mailarchives | |
| parent | 27fa56b204bde53dc35fd25442e3e8a77bccd96b (diff) | |
Update exception catching syntax to please pep8
Diffstat (limited to 'django/archives/mailarchives')
| -rw-r--r-- | django/archives/mailarchives/api.py | 2 | ||||
| -rw-r--r-- | django/archives/mailarchives/models.py | 2 | ||||
| -rw-r--r-- | django/archives/mailarchives/views.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/django/archives/mailarchives/api.py b/django/archives/mailarchives/api.py index 4afb7f1..4209811 100644 --- a/django/archives/mailarchives/api.py +++ b/django/archives/mailarchives/api.py @@ -41,7 +41,7 @@ def latest(request, listname): if 'n' in request.GET: try: limit = int(request.GET['n']) - except: + except Exception: limit = 0 else: limit = 50 diff --git a/django/archives/mailarchives/models.py b/django/archives/mailarchives/models.py index 5eeb2cb..fd9a017 100644 --- a/django/archives/mailarchives/models.py +++ b/django/archives/mailarchives/models.py @@ -56,7 +56,7 @@ class Message(models.Model): return None try: return hide_reasons[self.hiddenstatus] - except: + except Exception: # Weird value return 'This message has been hidden.' diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py index 82e8cef..aba82f5 100644 --- a/django/archives/mailarchives/views.py +++ b/django/archives/mailarchives/views.py @@ -720,7 +720,7 @@ def search(request): 'names': request.POST['ln'].split(','), }) lists = [x for x, in curs.fetchall()] - except: + except Exception: # If failing to parse list of lists, just search all lists = None else: |
