changeset 405:26c613434971

fetch_weather: Better check for 'force' commandline parameter.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 06 Jan 2017 21:20:52 +0200
parents 32be5d1dca29
children 4c3abf052d01
files fetch_weather.pl
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/fetch_weather.pl	Fri Jan 06 18:53:42 2017 +0200
+++ b/fetch_weather.pl	Fri Jan 06 21:20:52 2017 +0200
@@ -278,7 +278,7 @@
 
 my $cfgfile = shift;
 opt_read_config($cfgfile) == 0 or die("Errors while parsing configuration file '".$cfgfile."'.\n");
-my $force_update = shift eq "force";
+my $force_update = scalar(@ARGV) >= 1 && (shift eq "force");
 
 
 ###