mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Verify SSL certs only if Python supports SNI
http://docs.python-requests.org/en/master/community/faq/#what-are-hostname-doesn-t-match-errors
This commit is contained in:
parent
eecbc625df
commit
2f206d528b
@ -28,7 +28,7 @@ if not getattr(sys, 'frozen', False):
|
||||
import requests
|
||||
from xml.etree import ElementTree
|
||||
|
||||
r = requests.get(update_feed, timeout = 20)
|
||||
r = requests.get(update_feed, timeout = 20, verify = (sys.version_info >= (2,7,9)))
|
||||
feed = ElementTree.fromstring(r.text)
|
||||
items = dict([(item.find('enclosure').attrib.get('{http://www.andymatuschak.org/xml-namespaces/sparkle}version'),
|
||||
item.find('title').text) for item in feed.findall('channel/item')])
|
||||
|
Loading…
x
Reference in New Issue
Block a user