From patchwork Wed Jul 29 16:51:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3283 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4BH02Q4QWkz3wdN for ; Wed, 29 Jul 2020 16:52:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4BH02Q3426z1hM; Wed, 29 Jul 2020 16:52:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4BH02Q15Szz306q; Wed, 29 Jul 2020 16:52:14 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4BH02N1DlRz2xYR; Wed, 29 Jul 2020 16:52:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 4BH02L6tHSzQj; Wed, 29 Jul 2020 16:52:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1596041531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jjMYbvoIP5rc1UBEHoKUz6Y5CyAD0U3IabuDolLgMQk=; b=eZs+Ir+y1gQin3Uh/odlps46vyhz2pjE4Q4S8WXWx/0Cem3GToOfpbQF71J6WPQ5+/da7X dwmr57/uZ4gjCaDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1596041531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jjMYbvoIP5rc1UBEHoKUz6Y5CyAD0U3IabuDolLgMQk=; b=L9RGsYEQ2Azn/9HdaVquARgqSa7dEqxdePkgStSGmtFvujDFWA4mFkkQlxoEOCXQ17jHNs rGGv5bARzDPzuApu0OxsQrw1Fx77Fh6t9Ia+6bkyqc/yb3aR2CRCofDPkm6UT4wmnyuVtA zYQp/KyyJCBJ9/tjhITfoUnB1/cG3y67hRlhTL/GN7EMCr1CLCINyBMclu4NF4Gmb3Z8Lk USCgldc3DUTXl1XaAItNNAwC3Ta88o6CEfDTyjLs+GXRBNC5ciSFMCcJP/RzNncZgJOj4X R7Fod5QQV5ioObVSLXJMihf/UGCzKTdKC526RPNhSaHq2BdtNvVILlsiXz8mUQ== From: Stefan Schantl To: location@lists.ipfire.org Subject: [PATCH] location: Provide a return code if the database does not need to be updated. Date: Wed, 29 Jul 2020 18:51:59 +0200 Message-Id: <20200729165159.2207-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: development@lists.ipfire.org Errors-To: location-bounces@lists.ipfire.org Sender: "Location" Authentication-Results: mail01.ipfire.org; none X-Rspamd-Queue-Id: 4BH02Q3426z1hM X-Spamd-Result: default: False [1.41 / 11.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FROM_HAS_DN(0.00)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-0.28)[-0.281]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[stefan.schantl@ipfire.org,location-bounces@lists.ipfire.org]; BAYES_HAM(-3.00)[99.99%] X-Rspamd-Server: mail01.haj.ipfire.org Signed-off-by: Stefan Schantl --- src/python/location.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/location.in b/src/python/location.in index 5211b28..8cdd140 100644 --- a/src/python/location.in +++ b/src/python/location.in @@ -416,7 +416,7 @@ class CLI(object): _("The datase has recently be updated recently (%s)") % \ format_timedelta(now - t), ) - return + return 3 # Fetch the timestamp we need from DNS t = location.discover_latest_version()