From a8dc05dcf87930305baf1ea7e73b73fe4475ae45 Mon Sep 17 00:00:00 2001 From: Michiel Meeuwissen Date: Fri, 10 Nov 2023 20:12:29 +0100 Subject: [PATCH] Better logging. --- src/npoapi/bin/npo_media_follow_changes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/npoapi/bin/npo_media_follow_changes.py b/src/npoapi/bin/npo_media_follow_changes.py index 5e6f833..0e7e483 100755 --- a/src/npoapi/bin/npo_media_follow_changes.py +++ b/src/npoapi/bin/npo_media_follow_changes.py @@ -112,8 +112,11 @@ def one_call(self): reason_filter=self.args.reasonFilter, stream=True) + if response is None: + self.client.logger.debug("No response") + return if response.status != 200: - logging.error("Error %d" % response.status) + self.client.logger.error("Error %d" % response.status) return data = json_stream.load(response) changes = data['changes']