diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b93eddc4..dd8f85198 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - `intelmq.bots.collectors.shadowserver.collector_reports_api.py`: - Fixed behaviour if parameter `types` value is empty string, behave the same way as not set, not like no type. - `intelmq.bots.collectors.misp`: Use `PyMISP` class instead of deprecated `ExpandedPyMISP` (PR#2532 by Radek Vyhnal) +- `intelmq.bots.collectors.mail.collector_mail_url`: Fix import for Timeout exception preventing another exception (fixes #2555, PR#2556 by Sebastian Wagner). #### Parsers - `intelmq.bots.parsers.shadowserver._config`: diff --git a/intelmq/bots/collectors/mail/collector_mail_url.py b/intelmq/bots/collectors/mail/collector_mail_url.py index 9d13ea5a6..d4528b70c 100644 --- a/intelmq/bots/collectors/mail/collector_mail_url.py +++ b/intelmq/bots/collectors/mail/collector_mail_url.py @@ -8,6 +8,7 @@ """ import io import re +from requests.exceptions import Timeout from intelmq.lib.mixins import HttpMixin from intelmq.lib.splitreports import generate_reports @@ -50,7 +51,7 @@ def process_message(self, uid, message): self.logger.info("Downloading report from %r.", url) try: resp = self.http_get(url) - except requests.exceptions.Timeout: + except Timeout: self.logger.error("Request timed out %i times in a row." % self.http_timeout_max_tries) erroneous = True