|
From: Marc J. R. S. <mro...@ce...> - 2015-08-20 11:30:07
|
Move Tango specific members from taurusattribute to tangoattribute.
Refactor of taurusattribute:
Move getDisplayWriteValue to Tango scheme, mark it as deprecated
and raise a NotImplementedError.
---
lib/taurus/core/tango/tangoattribute.py | 4 ++++
lib/taurus/core/taurusattribute.py | 12 ------------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/lib/taurus/core/tango/tangoattribute.py b/lib/taurus/core/tango/tangoattribute.py
index 0e4a736..bf219c2 100755
--- a/lib/taurus/core/tango/tangoattribute.py
+++ b/lib/taurus/core/tango/tangoattribute.py
@@ -307,6 +307,10 @@ class TangoAttribute(TaurusAttribute):
return self.displayValue(v)
+ @tep14_deprecation(dbg_msg='Do not use')
+ def getDisplayWriteValue(self,cache=True):
+ raise NotImplementedError("Not available since Taurus4")
+
def encode(self, value):
"""Translates the given value into a tango compatible value according to
the attribute data type"""
diff --git a/lib/taurus/core/taurusattribute.py b/lib/taurus/core/taurusattribute.py
index 8f334b1..d31fa34 100644
--- a/lib/taurus/core/taurusattribute.py
+++ b/lib/taurus/core/taurusattribute.py
@@ -205,18 +205,6 @@ class TaurusAttribute(TaurusModel):
except:
return False
- def getDisplayWriteValue(self,cache=True):
- if not self.isWritable():
- self.warning("requesting write value of a read-only attribute")
- return None
-
- attrvalue = self.getValueObj(cache=cache)
- if not attrvalue:
- return None
-
- v = attrvalue.wvalue
- return self.displayValue(v)
-
def displayValue(self,value):
if value is None:
return None
--
1.8.1.4
|