Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Fix create new participan
Browse files Browse the repository at this point in the history
  • Loading branch information
leoporoli committed Sep 25, 2023
1 parent 0a35dbe commit 1be6117
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ def parse_input(input_args):
elif attr == "participants":
participants = []
for participant in input_args["participants"]:
new_participant = default_participant()
for sub_attr, sub_value in participant.items():
# if the value is set in input we set it in participant
new_participant[sub_attr] = sub_value
new_participant = create_new_participant(participant)
for _ in range(0, new_participant["count"]):
participants.append(new_participant)
result["participants"] = participants
Expand Down Expand Up @@ -177,6 +174,14 @@ def parse_input(input_args):

return result

def create_new_participant(participant_from_args):
new_participant = default_participant()
for sub_attr, sub_value in participant_from_args.items():
# if the value is set in input we set it in participant
new_participant[sub_attr] = sub_value

return new_participant

def get_client_log_level_or_default(participant_log_level, global_log_level, client_log_levels):
log_level = participant_log_level
if log_level == "":
Expand Down

0 comments on commit 1be6117

Please sign in to comment.