From 84ca9284d3130bbbec6b6a953a7b59150fc10ad4 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 24 May 2024 17:41:53 -0400 Subject: [PATCH] reorder indexnow parameter checks --- indexnow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indexnow b/indexnow index dcb9942a..19580784 100755 --- a/indexnow +++ b/indexnow @@ -10,12 +10,12 @@ if len(sys.argv) > 1: else: urls = sys.stdin.read().splitlines() +if not urls: + sys.exit(2) + for url in urls: if not validators.url(url): - sys.exit(2) - -if not urls: - sys.exit(3) + sys.exit(3) host = "grapheneos.org" api_url = "https://api.indexnow.org/indexnow"