mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
CURA-1831: Adding only the basic workaround for OSX
This commit is contained in:
parent
21ae73fca0
commit
a854554d94
1 changed files with 8 additions and 1 deletions
|
@ -9,6 +9,7 @@ from UM.Scene.SceneNode import SceneNode
|
|||
from UM.Message import Message
|
||||
from UM.i18n import i18nCatalog
|
||||
from UM.Logger import Logger
|
||||
from UM.Platform import Platform
|
||||
|
||||
import collections
|
||||
import json
|
||||
|
@ -18,6 +19,7 @@ import platform
|
|||
import math
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import ssl
|
||||
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
|
@ -111,8 +113,13 @@ class SliceInfo(Extension):
|
|||
binary_data = submitted_data.encode("utf-8")
|
||||
|
||||
# Submit data
|
||||
kwoptions = {"data" : binary_data,
|
||||
"timeout" : 1
|
||||
}
|
||||
if Platform.isOSX():
|
||||
kwoptions["context"] = ssl._create_unverified_context()
|
||||
try:
|
||||
f = urllib.request.urlopen(self.info_url, data = binary_data, timeout = 1)
|
||||
f = urllib.request.urlopen(self.info_url, **kwoptions)
|
||||
Logger.log("i", "Sent anonymous slice info to %s", self.info_url)
|
||||
f.close()
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue