From ee9b602e4ff6a2c444d5ac3c13cfc631774e8630 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 12 Sep 2021 23:31:33 +0200 Subject: [PATCH] catch http errors --- owrx/meta.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/owrx/meta.py b/owrx/meta.py index 0765637..60892eb 100644 --- a/owrx/meta.py +++ b/owrx/meta.py @@ -5,8 +5,7 @@ import pickle from abc import ABC, abstractmethod from datetime import datetime, timedelta from urllib import request - -from pycsdr.types import Format +from urllib.error import HTTPError from csdr.module import PickleModule from owrx.aprs import AprsParser, AprsLocation @@ -88,6 +87,8 @@ class RadioIDEnricher(Enricher): return item except json.JSONDecodeError: logger.warning("unable to parse radioid response JSON") + except HTTPError as e: + logger.warning("radioid responded with error: %s", str(e)) return None