[pytango] 32/98: Add exception trying to create writtable pipe or trying to write to one

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:17:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to tag v9.2.0
in repository pytango.

commit c901a4fb0af9fba3dad0d78b02e3fdb909684960
Author: Jose Tiago Coutinho Macara <tiago.coutinho at esrf.fr>
Date:   Fri Feb 26 09:16:04 2016 +0100

    Add exception trying to create writtable pipe or trying to write to one
---
 src/boost/python/device_proxy.py | 2 +-
 src/boost/python/server.py       | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/boost/python/device_proxy.py b/src/boost/python/device_proxy.py
index 425b259..b30a6d2 100644
--- a/src/boost/python/device_proxy.py
+++ b/src/boost/python/device_proxy.py
@@ -1187,7 +1187,7 @@ def __DeviceProxy__read_pipe(self, pipe_name, extract_as=ExtractAs.Numpy):
     return r.extract(extract_as)
 
 def __DeviceProxy__write_pipe(*args, **kwargs):
-    raise NotImplementedError
+    raise NotImplementedError('writtable pipes not implemented in 9.2.0a')
 
 def __DeviceProxy__read_attributes(self, *args, **kwargs):
     return self._read_attributes(*args, **kwargs)
diff --git a/src/boost/python/server.py b/src/boost/python/server.py
index 6892b50..00c94f2 100644
--- a/src/boost/python/server.py
+++ b/src/boost/python/server.py
@@ -979,6 +979,8 @@ class pipe(PipeData):
 
         super(pipe, self).__init__(name, class_name)
         self.build_from_dict(kwargs)
+        if self.pipe_write == PipeWriteType.PIPE_READ_WRITE:
+            raise NotImplementedError('writtable pipes not implemented in 9.2.0a')
 
     def get_pipe(self, obj):
         dclass = obj.get_device_class()
@@ -1000,12 +1002,9 @@ class pipe(PipeData):
         To be used as a decorator. Will define the decorated method
         as a write pipe method to be called when client writes to the pipe
         """
+        raise NotImplementedError('writtable pipes not implemented in 9.2.0a')
         self.fset = fset
-        if self.attr_write == AttrWriteType.READ:
-            if getattr(self, 'fget', None):
-                self.attr_write = AttrWriteType.READ_WRITE
-            else:
-                self.attr_write = AttrWriteType.WRITE
+        self.pipe_write = PipeWriteType.PIPE_READ_WRITE
         return self
 
     def write(self, fset):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list