From 668d52c2ba80fe4342682805b3fafe2d138dd8d4 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 24 Feb 2021 22:24:19 +0000 Subject: [PATCH] We need to deepcopy() when using GENERATE --- bridge_master.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bridge_master.py b/bridge_master.py index 92f1cd9..219a421 100755 --- a/bridge_master.py +++ b/bridge_master.py @@ -37,6 +37,7 @@ from bitarray import bitarray from time import time,sleep import importlib.util import re +import copy # Twisted is pretty important, so I keep it separate from twisted.internet.protocol import Factory, Protocol @@ -1895,7 +1896,7 @@ if __name__ == '__main__': if CONFIG['SYSTEMS'][system]['MODE'] == 'MASTER' and (CONFIG['SYSTEMS'][system]['GENERATOR'] > 1): for count in range(CONFIG['SYSTEMS'][system]['GENERATOR']): _systemname = system+'-'+str(count) - generator[_systemname] = CONFIG['SYSTEMS'][system].copy() + generator[_systemname] = copy.deepcopy(CONFIG['SYSTEMS'][system]) generator[_systemname]['PORT'] = generator[_systemname]['PORT'] + count logger.debug('(GLOBAL) Generator - generated system %s',_systemname) systemdelete.append(system)