mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 15:56:45 -04:00
flake8 - misc flake8 errs.
* unused variables * variables in loops overshadowing imports * excepts with no defined exc type (tried to avoid `except Exception` too) * history mapper is still too complex * default variables should never be mutable
This commit is contained in:
@@ -33,9 +33,9 @@ from app.utils import get_template_instance
|
||||
def _validate_positive_number(value, msg="Not a positive integer"):
|
||||
try:
|
||||
page_int = int(value)
|
||||
if page_int < 1:
|
||||
raise ValidationError(msg)
|
||||
except:
|
||||
except ValueError:
|
||||
raise ValidationError(msg)
|
||||
if page_int < 1:
|
||||
raise ValidationError(msg)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user