def _get_http_port(self):
        http_port = None
        try:
            http_port = self.query('pref', 'httpport', '?')
            if not http_port:
                _LOGGER.error(
                    "Unable to read data from server %s:%s",
                    self.host,
                    self.port)
                return
            return http_port
        except ConnectionError as ex:
            _LOGGER.error(
                "Failed to connect to server %s:%s - %s",
                self.host,
                self.port,
                ex)
            return
Helper function to check permissions
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/media_player/squeezebox.py/LogitechMediaServer._get_http_port--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3db/dvr.py/DVRRegisterPayment.permitted