From 1fa0571d0658f6196d31402e63457735e5fcf291 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 10 Sep 2020 16:07:44 +0100 Subject: scripts/check-lorry-urls: Don't report 'OK' after 'no Mercurial server ...' Move the info('OK') call so it's only reported if the Mercurial capability check succeeds. --- scripts/check-lorry-urls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/check-lorry-urls') diff --git a/scripts/check-lorry-urls b/scripts/check-lorry-urls index 94d659c..0829684 100755 --- a/scripts/check-lorry-urls +++ b/scripts/check-lorry-urls @@ -102,10 +102,10 @@ def check_file(filename): if result.info().get('Content-Type') \ != 'application/mercurial-0.1': error('no Mercurial server support detected') + else: + info('OK') except (urllib.error.URLError, http.client.HTTPException) as e: error(str(e)) - else: - info('OK') elif upstream_type == 'svn': try_command(['svn', 'info', '--non-interactive', upstream_url]) -- cgit v1.2.1