diff options
author | coutinho <coutinho@esrf.fr> | 2015-01-09 17:02:40 +0100 |
---|---|---|
committer | cpascual <cpascual@cells.es> | 2015-01-26 16:02:53 +0100 |
commit | 32f13d3d3f1a3768320ede70299cc91208233b6a (patch) | |
tree | 0632362301466675b20b031902e5ea55ecb40d37 /taurus | |
parent | 17c8c86be24a4864de3e38b8cdac1c206da8c73d (diff) |
Fix bug-240: polling error when deleting attribute
When an attribute is being removed from the polling list, the
function is not protected against inexisting attribute. Protect it.
Diffstat (limited to 'taurus')
-rw-r--r-- | taurus/lib/taurus/core/tauruspollingtimer.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/taurus/lib/taurus/core/tauruspollingtimer.py b/taurus/lib/taurus/core/tauruspollingtimer.py index 3a496382..623a0c9d 100644 --- a/taurus/lib/taurus/core/tauruspollingtimer.py +++ b/taurus/lib/taurus/core/tauruspollingtimer.py @@ -74,6 +74,8 @@ class TaurusPollingTimer(Logger): self.lock.acquire() try: attr_dict = self.dev_dict.get(dev) + if attr_dict is None: + return False return attr_dict and attr_dict.has_key(attr_name) finally: self.lock.release() |