Handle unknown server in gam version extended location (#947)

Line 847 drops a training space
This commit is contained in:
Ross Scroggs
2019-06-07 13:11:34 -07:00
committed by Jay Lee
parent f85a072708
commit 705a40d035

View File

@@ -844,10 +844,13 @@ def doGAMVersion(checkForArgs=True):
def _getServerTLSUsed(location):
url = 'https://%s' % location
_, netloc, _, _, _, _ = urlparse(url)
_, netloc, _, _, _, _ = urlparse(url)
conn = 'https:%s' % netloc
httpc = _createHttpObj()
httpc.request(url)
try:
httpc.request(url)
except httplib2.ServerNotFoundError as e:
systemErrorExit(4, e)
cipher_name, tls_ver, _ = httpc.connections[conn].sock.cipher()
return tls_ver, cipher_name