File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -276,8 +276,13 @@ def send_usage_statistics():
276276
277277 class SendUsageStatistics (QThread ):
278278 def run (self ):
279- usage = UsageStatistics ()
280- usage .send_statistics ()
279+ try :
280+ usage = UsageStatistics ()
281+ usage .send_statistics ()
282+ except Exception : # pylint: disable=broad-except
283+ # unhanled exceptions in threads will crash Orange and nothing
284+ # that happens here should
285+ log .warning ("Failed to send usage statistics." )
281286
282287 thread = SendUsageStatistics ()
283288 thread .start ()
Original file line number Diff line number Diff line change @@ -122,8 +122,6 @@ def send_statistics(self):
122122 json .dump ([], f )
123123 except (ConnectionError , requests .exceptions .RequestException ):
124124 log .warning ("Connection error while attempting to send usage statistics." )
125- except Exception :
126- log .warning ("Failed to send usage statistics." )
127125
128126 def write_statistics (self ):
129127 if not release :
You can’t perform that action at this time.
0 commit comments