Skip to content

Commit

Permalink
Merge from 5.x.x: PR #15889
Browse files Browse the repository at this point in the history
Fixes #15876
  • Loading branch information
ccordoba12 committed Jun 23, 2021
2 parents 7e32056 + 30c69e5 commit a11976d
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions spyder/plugins/completion/providers/kite/utils/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,15 @@ def check_kite_installers_availability():
elif sys.platform == 'darwin':
url = MAC_URL

req = requests.head(url)
available = req.ok
if req.ok:
if req.is_redirect:
loc = req.headers['Location']
req = requests.head(loc)
available = req.ok
available = False
try:
req = requests.head(url)
available = req.ok
if req.ok:
if req.is_redirect:
loc = req.headers['Location']
req = requests.head(loc)
available = req.ok
except Exception:
pass
return available

0 comments on commit a11976d

Please sign in to comment.