Skip to content
Snippets Groups Projects
Commit 40e0db3f authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Testing server verification...

parent 630fdad9
No related branches found
No related tags found
No related merge requests found
......@@ -39,16 +39,20 @@ def hit_endpoint(method, endpoint, params=None):
def verify_server(popup=True):
resp = hit_endpoint('GET', '/')
if resp['status'] == 404:
try:
resp = hit_endpoint('GET', '/')
except Exception as e:
print(e)
msg = 'Could not find server found at ' + uri
IJ.log(msg)
if popup:
IJ.error(msg)
elif resp['status'] != 200:
return False
if resp['status'] != 200:
msg = 'Unknown error verifying server at ' + uri
if popup:
IJ.error(msg)
return False
else:
IJ.log('Verified server is online at ' + uri)
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment