Skip to content

Commit f93f237

Browse files
committed
Fix TypeError on statistics send if attributes are empty
1 parent acd72c5 commit f93f237

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reportportal_client/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,9 @@ def start_launch(self,
341341

342342
if not self._skip_analytics:
343343
agent_name, agent_version = None, None
344+
344345
agent_attribute = [a for a in attributes if
345-
a.get('key') == 'agent']
346+
a.get('key') == 'agent'] if attributes else []
346347
if len(agent_attribute) > 0 and agent_attribute[0].get('value'):
347348
agent_name, agent_version = agent_attribute[0]['value'].split(
348349
'|')

0 commit comments

Comments
 (0)