Exit update readings on empty return from http get request.

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1350 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2012-03-15 19:11:45 +00:00
parent 3856adccce
commit af99086b97

View File

@ -121,6 +121,7 @@ sub Weather_RetrieveDataDirectly($)
my $fc = undef;
my $xml = GetHttpFile("www.google.com:80", "/ig/api?weather=" . $location . "&hl=" . $lang);
return 0 if($xml eq "");
foreach my $l (split("<",$xml)) {
#Log 1, "DEBUG WEATHER: line=\"$l\"";
next if($l eq ""); # skip empty lines