]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
parsearchive: Don't catch standard exceptions
authorStephen Finucane <stephen@that.guru>
Sat, 8 Oct 2016 17:11:24 +0000 (18:11 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 8 Oct 2016 18:06:51 +0000 (19:06 +0100)
It's too broad. The exception that was intended to be caught should be
converted to a more specific exception instead.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/management/commands/parsearchive.py

index c15971a47397196e8bd7b4b66892b36a447e9f30..40b2cc02a00e11b078d5130a66eb8d0f685b7fd0 100644 (file)
@@ -82,7 +82,7 @@ class Command(BaseCommand):
                     dropped += 1
             except django.db.utils.IntegrityError:
                 duplicates += 1
-            except (ValueError, Exception):
+            except ValueError:
                 # TODO(stephenfin): Perhaps we should store the broken patch
                 # somewhere for future reference?
                 errors += 1