@property
    def listener(self):
        "Return the multiprocessing Listener object"
        if self._listener is None:
            if self.FAMILY == 'AF_UNIX' and os.path.exists(self.addr):
                os.unlink(self.addr)
            try:
                log.debug("Listening to events from: %s" % self.addr)
                self._listener = Listener(self.addr, family=self.FAMILY)
            except socket.error as err:
                if err.errno == 48:
                    msg = "Unix socket '%s' appears to be in use. Please stop this program."
                    raise errors.ChalmersError(msg % self.addr)
                else:
                    raise
        return self._listener
dataset/ETHPy150Open Anaconda-Platform/chalmers/chalmers/event_dispatcher.py/EventDispatcher.listener/original