Formatting
This commit is contained in:
parent
c5d08d2c35
commit
6acaccec7c
|
@ -24,11 +24,12 @@ class Useless(DatabasePlugin):
|
|||
address = args['<address>']
|
||||
if not address.startswith('http://'):
|
||||
address = 'https://{}'.format(address)
|
||||
parsed = urlparse(address)
|
||||
|
||||
try:
|
||||
requests.head(address)
|
||||
state = 'up'
|
||||
except requests.ConnectionError:
|
||||
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