mirror of https://github.com/huashengdun/webssh
Changed "|" to "or"
parent
c35f801235
commit
b4ca604518
|
@ -234,7 +234,7 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
|
||||||
|
|
||||||
def get_hostname(self):
|
def get_hostname(self):
|
||||||
value = self.get_value('hostname')
|
value = self.get_value('hostname')
|
||||||
if not (is_valid_hostname(value) | is_valid_ip_address(value)):
|
if not (is_valid_hostname(value) or is_valid_ip_address(value)):
|
||||||
raise InvalidValueError('Invalid hostname: {}'.format(value))
|
raise InvalidValueError('Invalid hostname: {}'.format(value))
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue