diff options
Diffstat (limited to 'rpki/gui')
-rw-r--r-- | rpki/gui/app/forms.py | 4 | ||||
-rw-r--r-- | rpki/gui/app/glue.py | 2 | ||||
-rw-r--r-- | rpki/gui/cacheview/forms.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/rpki/gui/app/forms.py b/rpki/gui/app/forms.py index 20ce4a07..5394a804 100644 --- a/rpki/gui/app/forms.py +++ b/rpki/gui/app/forms.py @@ -257,8 +257,8 @@ class ROARequest(forms.Form): raise forms.ValidationError( 'max prefix length must be greater than or equal to the prefix length') if max_prefixlen > r.min.bits: - raise forms.ValidationError, \ - 'max prefix length (%d) is out of range for IP version (%d)' % (max_prefixlen, r.min.bits) + raise forms.ValidationError( + 'max prefix length (%d) is out of range for IP version (%d)' % (max_prefixlen, r.min.bits)) self.cleaned_data['max_prefixlen'] = str(max_prefixlen) return self.cleaned_data diff --git a/rpki/gui/app/glue.py b/rpki/gui/app/glue.py index b05e8f0d..0bf5f942 100644 --- a/rpki/gui/app/glue.py +++ b/rpki/gui/app/glue.py @@ -102,7 +102,7 @@ def list_received_resources(log, conf): if isinstance(pdu, report_error_elt): # this will cause the db to be rolled back so the above delete() # won't clobber existing resources - raise LeftRightError, pdu + raise LeftRightError(pdu) elif isinstance(pdu, list_received_resources_elt): if pdu.parent_handle != conf.handle: parent = models.Parent.objects.get(issuer=conf, diff --git a/rpki/gui/cacheview/forms.py b/rpki/gui/cacheview/forms.py index 28b8ff24..7ae3601f 100644 --- a/rpki/gui/cacheview/forms.py +++ b/rpki/gui/cacheview/forms.py @@ -30,19 +30,19 @@ class SearchForm(forms.Form): asn = self.cleaned_data.get('asn') addr = self.cleaned_data.get('addr') if (asn and addr) or ((not asn) and (not addr)): - raise forms.ValidationError, 'Please specify either an AS or IP range, not both' + raise forms.ValidationError('Please specify either an AS or IP range, not both') if asn: try: resource_range_as.parse_str(asn) except ValueError: - raise forms.ValidationError, 'invalid AS range' + raise forms.ValidationError('invalid AS range') if addr: #try: parse_ipaddr(addr) #except BadIPResource: - # raise forms.ValidationError, 'invalid IP address range/prefix' + # raise forms.ValidationError('invalid IP address range/prefix') return self.cleaned_data |