Remove unused variable references

This commit is contained in:
Magnus Hagander
2018-06-29 13:39:43 +02:00
parent 51dc1212a4
commit b7bed6dece
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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: