From a264543658e368ba51a13749c5aa458cdaa7b3e3 Mon Sep 17 00:00:00 2001 From: todd Date: Wed, 22 Jan 2025 10:34:18 +0000 Subject: [PATCH] BF: Fix `getDeviceProfile` so it no longer returns unusable keys --- psychopy_cedrus/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/psychopy_cedrus/base.py b/psychopy_cedrus/base.py index b79a4f2..9f57e2b 100644 --- a/psychopy_cedrus/base.py +++ b/psychopy_cedrus/base.py @@ -268,6 +268,7 @@ def isSameDevice(self, other): other = other.parent elif isinstance(other, dict) and "pad" in other: # if given a dict, make sure we have an `index` rather than a `pad` + other = other.copy() other['index'] = other.pop('pad') # use parent's comparison method return self.parent.isSameDevice(other) @@ -392,6 +393,7 @@ def isSameDevice(self, other): other = other.parent elif isinstance(other, dict) and "pad" in other: # if given a dict, make sure we have an `index` rather than a `pad` + other = other.copy() other['index'] = other.pop('pad') # use parent's comparison method return self.parent.isSameDevice(other) @@ -509,6 +511,7 @@ def isSameDevice(self, other): other = other.parent elif isinstance(other, dict) and "pad" in other: # if given a dict, make sure we have an `index` rather than a `pad` + other = other.copy() other['index'] = other.pop('pad') # use parent's comparison method return self.parent.isSameDevice(other)