diff --git a/unfair/model/utils.py b/unfair/model/utils.py index 51e35a2..eba79e0 100644 --- a/unfair/model/utils.py +++ b/unfair/model/utils.py @@ -281,11 +281,17 @@ def __init__(self, sim): ) = toks ccas = tuple(ccas.split(",")) flows = tuple(int(f) for f in flows.split(",")) + assert ccas, "No CCAs!" + assert flows, "No flows!" self.cca_1_name = ccas[0] - self.cca_2_name = ccas[1] - self.cca_back_name = "" cca_1_flws = flows[0] - cca_2_flws = flows[1] + if len(ccas) == 2: + self.cca_2_name = ccas[1] + cca_2_flws = flows[1] + else: + self.cca_2_name = ccas[0] + cca_2_flws = 0 + self.cca_back_name = "" cca_back_flws = 0 bitrate_Mbps_1 = "0bitrate" bitrate_Mbps_2 = "0bitrate"