Skip to content

Commit

Permalink
Merge pull request #2220 from jerneju/errorreportnig-url
Browse files Browse the repository at this point in the history
[FIX] Error Report: URL changed
  • Loading branch information
lanzagar authored Apr 14, 2017
2 parents c9266f8 + ff317a8 commit 38b3897
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Orange/canvas/application/errorreporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from tempfile import mkstemp
from collections import OrderedDict
from urllib.parse import urljoin, urlencode
from urllib.request import pathname2url, urlopen
from urllib.request import pathname2url, urlopen, build_opener
from unittest.mock import patch

from AnyQt.QtCore import pyqtSlot, QSettings, Qt
Expand All @@ -33,7 +33,7 @@ class OWWidget: pass
VERSION_STR = '???'


REPORT_POST_URL = 'http://orange.biolab.si/error_report/v1/'
REPORT_POST_URL = 'https://qa.orange.biolab.si/error_report/v1/'

log = logging.getLogger()

Expand Down Expand Up @@ -141,7 +141,10 @@ def _post_report(data):
MAX_RETRIES = 2
for _retry in range(MAX_RETRIES):
try:
urlopen(REPORT_POST_URL,
opener = build_opener()
u = opener.open(REPORT_POST_URL)
url = u.geturl()
urlopen(url,
timeout=10,
data=urlencode(data).encode('utf8'))
except Exception as e:
Expand Down

0 comments on commit 38b3897

Please sign in to comment.