Commit 6713d8b1 by Matthias Putz

Fix: rescue if https url for init fails due to ssl handshake failure

parent 3568b211
...@@ -629,7 +629,13 @@ class Remote(object): ...@@ -629,7 +629,13 @@ class Remote(object):
else: else:
try: try:
info_url = u + 'ssh_info' info_url = u + 'ssh_info'
info = urllib.request.urlopen(info_url).read() from trace import Trace
Trace("urlopen %s" % info_url)
try:
info = urllib.request.urlopen(info_url).read()
except Exception:
info = 'NOT_AVAILABLE'
if info == 'NOT_AVAILABLE' or '<' in info: if info == 'NOT_AVAILABLE' or '<' in info:
# If `info` contains '<', we assume the server gave us some sort # If `info` contains '<', we assume the server gave us some sort
# of HTML response back, like maybe a login page. # of HTML response back, like maybe a login page.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment