From: Stephen Finucane Date: Sat, 8 Oct 2016 17:11:24 +0000 (+0100) Subject: parsearchive: Don't catch standard exceptions X-Git-Tag: v2.0.0-rc1~202 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4a33233a8798251b8360b1d91497a68ef2454c7;p=thirdparty%2Fpatchwork.git parsearchive: Don't catch standard exceptions 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 --- diff --git a/patchwork/management/commands/parsearchive.py b/patchwork/management/commands/parsearchive.py index c15971a4..40b2cc02 100644 --- a/patchwork/management/commands/parsearchive.py +++ b/patchwork/management/commands/parsearchive.py @@ -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