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, k,v,
", ".join(cvss.constants3.METRICS_VALUES[k].keys()), ", ".join(cvss.constants3.METRICS_VALUES[k].keys()),
)) ))
except ValidationError, ve: except ValidationError:
raise raise
except Exception, e: except Exception, e:
raise ValidationError("Failed to parse vectors: %s" % e) raise ValidationError("Failed to parse vectors: %s" % e)
@ -98,7 +98,7 @@ class SecurityPatch(models.Model):
try: try:
c = cvss.CVSS3("CVSS:3.0/" + self.cvssvector) c = cvss.CVSS3("CVSS:3.0/" + self.cvssvector)
return c.base_score return c.base_score
except Exception, e: except Exception:
return -1 return -1
@property @property

View File

@ -10,7 +10,7 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
else: else:
# Regular form item, attempt to edit it # Regular form item, attempt to edit it
try: try:
i = int(itemid) int(itemid)
except ValueError: except ValueError:
raise Http404("Invalid URL") raise Http404("Invalid URL")
if createifempty: if createifempty: