location: Provide a return code if the database does not need to be updated.

Message ID 20200729165159.2207-1-stefan.schantl@ipfire.org
State Accepted
Commit a243587a0e73f74010248ed6483baa7d0d7030d4
Headers
Series location: Provide a return code if the database does not need to be updated. |

Commit Message

Stefan Schantl July 29, 2020, 4:51 p.m. UTC
  Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 src/python/location.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer Aug. 4, 2020, 9:42 a.m. UTC | #1
Thank you. Merged.

> On 29 Jul 2020, at 17:51, Stefan Schantl <stefan.schantl@ipfire.org> wrote:
> 
> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
> 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()
> -- 
> 2.20.1
>
  

Patch

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()