From 3b3ea98afdb79cccd9a44fa479df52444b15a98c Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 16 Jul 2018 10:56:33 -0400 Subject: [PATCH] Handling no host error in text importer. --- apps/rss_feeds/text_importer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/rss_feeds/text_importer.py b/apps/rss_feeds/text_importer.py index 21e7ce837..97b1fc630 100644 --- a/apps/rss_feeds/text_importer.py +++ b/apps/rss_feeds/text_importer.py @@ -1,4 +1,5 @@ import requests +import urllib3 import zlib from requests.packages.urllib3.exceptions import LocationParseError from socket import error as SocketError @@ -194,6 +195,7 @@ class TextImporter: requests.models.InvalidURL, requests.models.ChunkedEncodingError, requests.models.ContentDecodingError, + urllib3.exceptions.LocationValueError, LocationParseError, OpenSSLError, PyAsn1Error), e: logging.user(self.request, "~SN~FRFailed~FY to fetch ~FGoriginal text~FY: %s" % e) return