From b7bed6dece8904171c967ea2a1f28b22fcf8b3c8 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 29 Jun 2018 13:39:43 +0200 Subject: [PATCH] Remove unused variable references --- pgweb/security/models.py | 4 ++-- pgweb/util/helpers.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pgweb/security/models.py b/pgweb/security/models.py index e8131675..0c6e7bab 100644 --- a/pgweb/security/models.py +++ b/pgweb/security/models.py @@ -40,7 +40,7 @@ def other_vectors_validator(val): k,v, ", ".join(cvss.constants3.METRICS_VALUES[k].keys()), )) - except ValidationError, ve: + except ValidationError: raise except Exception, e: raise ValidationError("Failed to parse vectors: %s" % e) @@ -98,7 +98,7 @@ class SecurityPatch(models.Model): try: c = cvss.CVSS3("CVSS:3.0/" + self.cvssvector) return c.base_score - except Exception, e: + except Exception: return -1 @property diff --git a/pgweb/util/helpers.py b/pgweb/util/helpers.py index 7f0a45cf..5377a113 100644 --- a/pgweb/util/helpers.py +++ b/pgweb/util/helpers.py @@ -10,7 +10,7 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for else: # Regular form item, attempt to edit it try: - i = int(itemid) + int(itemid) except ValueError: raise Http404("Invalid URL") if createifempty: