From ff317a892525a39318ddf45447c1cc33df7caabe Mon Sep 17 00:00:00 2001 From: Jernej Urankar Date: Tue, 11 Apr 2017 13:10:49 +0200 Subject: [PATCH] [FIX] Error Report: URL changed & redirect new url and redirect --- Orange/canvas/application/errorreporting.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Orange/canvas/application/errorreporting.py b/Orange/canvas/application/errorreporting.py index 496a600c19e..6cf6b01539a 100644 --- a/Orange/canvas/application/errorreporting.py +++ b/Orange/canvas/application/errorreporting.py @@ -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 @@ -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() @@ -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: