From cc548da10fb61f31fedb69895eaf9d85f723322d Mon Sep 17 00:00:00 2001 From: Daniel Brown <ddb@star.sr.bham.ac.uk> Date: Wed, 28 Sep 2016 15:18:05 -0700 Subject: [PATCH] Fixing python 2 errors with isolator1 component and list copying --- pykat/__init__.py | 2 +- pykat/components.py | 3 ++- pykat/param.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pykat/__init__.py b/pykat/__init__.py index 4789b0b..086773c 100644 --- a/pykat/__init__.py +++ b/pykat/__init__.py @@ -3,7 +3,7 @@ from __future__ import division from __future__ import print_function from __future__ import unicode_literals -__version__ = "1.0.13" +__version__ = "1.0.14" # This flag is used to switch on the gui features in pkat at import time USE_GUI = False diff --git a/pykat/components.py b/pykat/components.py index 7b962bc..d5dadca 100644 --- a/pykat/components.py +++ b/pykat/components.py @@ -1068,7 +1068,8 @@ class isolator1(Component): return rtn - + def getQGraphicsItem(self): + raise NotImplemented() class lens(Component): diff --git a/pykat/param.py b/pykat/param.py index 6644407..8523205 100644 --- a/pykat/param.py +++ b/pykat/param.py @@ -86,7 +86,8 @@ class putter(object): self.__owner = weakref.ref(newOwner) def clearPuts(self): - for _ in self.putees.copy(): + import copy + for _ in copy.copy(self.putees): _.put(None) def register(self, toput): -- GitLab