- if int(nb_cores) == 1:
- index = 0
- temp_str = '({port}, {queue}, {core}),'.\
- format(port=port, queue=queue,
- core=int(list_cores[index]))
- else:
- temp_str = '({port}, {queue}, {core}),'.\
- format(port=port, queue=queue,
- core=int(list_cores[index]))
-
- port_config += temp_str
- index = index + 1
+ index = 0 if nb_cores == 1 else index
+ port_config += '({port}, {queue}, {core}),'.\
+ format(port=port, queue=queue, core=list_cores[index])
+ index += 1