Formatting
This commit is contained in:
parent
c5d08d2c35
commit
6acaccec7c
|
@ -24,11 +24,12 @@ class Useless(DatabasePlugin):
|
||||||
address = args['<address>']
|
address = args['<address>']
|
||||||
if not address.startswith('http://'):
|
if not address.startswith('http://'):
|
||||||
address = 'https://{}'.format(address)
|
address = 'https://{}'.format(address)
|
||||||
parsed = urlparse(address)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
requests.head(address)
|
requests.head(address)
|
||||||
state = 'up'
|
state = 'up'
|
||||||
except requests.ConnectionError:
|
except requests.ConnectionError:
|
||||||
state = 'down'
|
state = 'down'
|
||||||
return '{}://{} seems to be {}'.format(parsed.scheme, parsed.netloc, state)
|
|
||||||
|
parsed = urlparse(address)
|
||||||
|
return '\x02{}://{}\x02 seems to be \x02{}\x02'.format(parsed.scheme, parsed.netloc, state)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user