From 85897ca526c22ddd5e1286eb0fec63ba364bd07e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 11 Mar 2021 11:41:14 +0000 Subject: [PATCH] Only print with debug --- like.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/like.py b/like.py index 6868ad09a..4dcc86ceb 100644 --- a/like.py +++ b/like.py @@ -254,8 +254,9 @@ def sendUndoLikeViaServer(baseDir: str, session, print('DEBUG: announce webfinger failed for ' + handle) return 1 if not isinstance(wfRequest, dict): - print('WARN: Webfinger for ' + handle + ' did not return a dict. ' + - str(wfRequest)) + if debug: + print('WARN: Webfinger for ' + handle + + ' did not return a dict. ' + str(wfRequest)) return 1 postToBox = 'outbox' @@ -287,7 +288,8 @@ def sendUndoLikeViaServer(baseDir: str, session, postResult = postJson(session, newUndoLikeJson, [], inboxUrl, headers, 30, True) if not postResult: - print('WARN: POST announce failed for c2s to ' + inboxUrl) + if debug: + print('WARN: POST announce failed for c2s to ' + inboxUrl) return 5 if debug: