Skip to content

Commit

Permalink
[FIX] Error Report: URL changed & redirect
Browse files Browse the repository at this point in the history
new url and redirect
  • Loading branch information
jerneju committed Apr 14, 2017
1 parent 3690174 commit ff317a8
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 ff317a8

Please sign in to comment.