def get_pdf(self):
        if self.has_file:
            return self.get_file()
        try:
            pdf_url = self.get_pdf_url()
            if pdf_url:
                r = requests.get(pdf_url, timeout=10)
                return r.content
        except (__HOLE__, requests.exceptions.Timeout):
            pass
        return None
dataset/ETHPy150Open Impactstory/total-impact-webapp/totalimpactwebapp/product.py/Product.get_pdf