mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
Remove unused variable references
This commit is contained in:
@ -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
|
||||||
|
@ -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:
|
||||||
|
Reference in New Issue
Block a user