Skip to content

Commit d7c9b72

Browse files
authored
Merge pull request #4190 from irgolic/statistics-324-update
Adapt usage statistics for orange-canvas-core 0.1.9
2 parents 5abc0a2 + 45b4950 commit d7c9b72

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Orange/canvas/__main__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ def open_link(url: QUrl):
160160

161161
if not settings.contains('reporting/machine-id'):
162162
settings.setValue('reporting/machine-id', str(uuid.uuid4()))
163-
pass
164163
else:
165164
QDesktopServices.openUrl(url)
166165

@@ -332,8 +331,7 @@ def send_statistics(url):
332331

333332
is_anaconda = 'Continuum' in sys.version or 'conda' in sys.version
334333

335-
usage = UsageStatistics()
336-
data = usage.load()
334+
data = UsageStatistics.load()
337335
for d in data:
338336
d["Orange Version"] = d.pop("Application Version", "")
339337
d["Anaconda"] = is_anaconda
@@ -342,11 +340,11 @@ def send_statistics(url):
342340
r = requests.post(url, files={'file': json.dumps(data)})
343341
if r.status_code != 200:
344342
log.warning("Error communicating with server while attempting to send "
345-
"usage statistics.")
343+
"usage statistics. Status code " + str(r.status_code))
346344
return
347345
# success - wipe statistics file
348346
log.info("Usage statistics sent.")
349-
with open(usage.filename(), 'w', encoding="utf-8") as f:
347+
with open(UsageStatistics.filename(), 'w', encoding="utf-8") as f:
350348
json.dump([], f)
351349
except (ConnectionError, requests.exceptions.RequestException):
352350
log.warning("Connection error while attempting to send usage statistics.")

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ requirements:
5454
- opentsne >=0.3.11
5555
- pandas
5656
- pyyaml
57-
- orange-canvas-core >=0.1.7
57+
- orange-canvas-core >=0.1.9
5858
- orange-widget-base
5959

6060
test:

requirements-gui.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
orange-canvas-core>=0.1.7,<0.2a
1+
orange-canvas-core>=0.1.9,<0.2a
22
orange-widget-base>=4.1.0
33

44
# PyQt4/PyQt5 compatibility

0 commit comments

Comments
 (0)