From 705a40d0352a41f5805684c9efe063677493e911 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Fri, 7 Jun 2019 13:11:34 -0700 Subject: [PATCH] Handle unknown server in gam version extended location (#947) Line 847 drops a training space --- src/gam.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gam.py b/src/gam.py index 18f92606..6d7cf075 100755 --- a/src/gam.py +++ b/src/gam.py @@ -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