def download(self, href):
        """
        Download file and return response
        :param href: remote path
        :return: file responce
        """
        for iTry in range(TRYINGS):
            try:
                logger.info(u("download(%s): %s") % (iTry, href))
                href = remote(href)
                conn = self.getConnection()
                conn.request("GET", _encode_utf8(href), "", self.getHeaders())
                response = conn.getresponse()
                checkResponse(response, "href={0}".format(href))
                data = response.read()
                if data == b('resource not found'):
                    return b("")
                else:
                    return data
            except ConnectionException:
                raise
            except Exception:
                e = sys.exc_info()[1]
                logger.exception(e)
dataset/ETHPy150Open lexich/yandex-disk-webdav/yandexwebdav.py/Config.download/original