From a3f5bd4c53ae4bc30aa8f3169628b05b5f8da3d6 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sat, 12 Sep 2020 15:06:48 +1000 Subject: [PATCH] suppress IndexError message for q=2 or more - adds username to "No toots found" message - only prints if quiet <= 1 --- ephemetoot/ephemetoot.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ephemetoot/ephemetoot.py b/ephemetoot/ephemetoot.py index 3675b7c..1426182 100644 --- a/ephemetoot/ephemetoot.py +++ b/ephemetoot/ephemetoot.py @@ -585,7 +585,14 @@ def check_batch(config, options, mastodon, user_id, timeline, deleted_count=0): print("---------------------------------------\n") except IndexError: - print("No toots found!\n") + if not options.quiet or options.quiet <= 1: + print( + "No toots found for " + + config["username"] + + "@" + + config["base_url"] + + ".\n" + ) def check_toots(config, options, retry_count=0):