Commit 6ff236a2 authored by Cyril Guilloud's avatar Cyril Guilloud Committed by Cyril Guilloud
Browse files

improve __info__ for pepu object. (+ remove dead-code )

parent af0c9a30
......@@ -476,7 +476,7 @@ class Command:
return f"{self.__class__.__name__}[{self._host}:{self._port}]"
def __info__(self):
info_str = "TCP COMMAND: host={self._host} port={self._port} \n"
info_str = f"TCP COMMAND: host={self._host} port={self._port} \n"
return info_str
......@@ -82,10 +82,10 @@ def _command(cnx, cmd, data=None, pre_cmd=None, timeout=None):
if ioex.errno == 113:
_msg = f"IOError no {ioex.errno}:{errno.errorcode[ioex.errno]}"
_msg += f"\nmessage={os.strerror(ioex.errno)} "
_msg += f"\nPlease check that icepap controller '{cnx._host}' is ON"
_msg += f"\nPlease check that controller '{cnx._host}' is ON"
_msg = f"IOError no {ioex.errno} : {ioex.strerror}"
_msg += f"\nCannot communicate with icepap controller: '{cnx._host}'"
_msg += f"\nCannot communicate with controller: '{cnx._host}'"
raise CommunicationError(_msg) from ioex
......@@ -17,7 +17,6 @@ import numpy
from bliss.comm.util import get_comm, TCP
from bliss.controllers.motors.icepap import _command, _ackcommand
from bliss.controllers.counter import CounterController
from bliss.common.counter import Counter
......@@ -317,14 +316,6 @@ class BaseChannel(object):
def pepu(self):
return self._pepu()
# Counter shortcut
def counters(self):
from bliss.scanning.acquisition.pepu import PepuCounter
return PepuCounter(self)
class BaseChannelINOUT(BaseChannel):
......@@ -685,7 +676,10 @@ class PEPU(CounterController):
return self.raw_write_read(cmd)
def __info__(self):
return "{0}(name={1!r})".format(type(self).__name__,
info_str = f"{type(self).__name__} (name={})\n"
info_str += f"{self.conn.__info__()}\n"
return info_str
class PepuCounter(Counter):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment