From 4b0388d21b225b35912d126a412f0f7cf6425e8a Mon Sep 17 00:00:00 2001 From: Enrico Faulhaber Date: Wed, 31 Aug 2016 11:02:47 +0200 Subject: [PATCH] use per instance copies of PARAMS allowing more than one device per class Change-Id: I9deabd38c8ca221c4ac416a2dfcc9a5ad4b73148 --- src/devices/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/devices/core.py b/src/devices/core.py index 6e32eed..982620b 100644 --- a/src/devices/core.py +++ b/src/devices/core.py @@ -193,6 +193,11 @@ class Device(object): self.DISPATCHER = dispatcher self.log = logger self.name = devname + # make local copies of PARAMS + params = {} + for k,v in self.PARAMS.items(): + params[k] = PARAM(v) + self.PARAMS = params # check config for problems # only accept config items specified in PARAMS for k, v in cfgdict.items():