mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Flake8: Comply with new E722 rule.
This commit is contained in:
@@ -201,12 +201,12 @@ class IpAddress(OptionallyRequired):
|
||||
def run_validation(self, value):
|
||||
try:
|
||||
host, port = value.rsplit(':', 1)
|
||||
except:
|
||||
except Exception:
|
||||
raise ValidationError("Must be a string of format 'IP:PORT'")
|
||||
|
||||
try:
|
||||
port = int(port)
|
||||
except:
|
||||
except Exception:
|
||||
raise ValidationError("'{0}' is not a valid port".format(port))
|
||||
|
||||
class Address(namedtuple('Address', 'host port')):
|
||||
|
||||
Reference in New Issue
Block a user