X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/48c48c6c4bb57ffccf8ee85e539c65576f053b61..4dc5359f5dc079715d4351475d29cabe5fe8b355:/weathermon

diff --git a/weathermon b/weathermon
index 7b78ca7..66d6ac4 100755
--- a/weathermon
+++ b/weathermon
@@ -210,17 +210,19 @@ def process_str(str):
       sensor_id = None
       for rec in sens:
         key,value = rec.split('=')
-        if key == 'TYPE':
-          sensor_type = value
-        elif key == 'ID':
-          sensor_id = value  
-        else:  
-          sensor[key] = value
+	value=value.strip()
+	if len(value)>0:
+          if key == 'TYPE':
+            sensor_type = value
+          elif key == 'ID':
+            sensor_id = value  
+          else:  
+            sensor[key] = value
       if sensor_type:    
         if not sensor_id:
           sensor_id='DEFAULT';    
       for key in sensor:
-	if sensor[key] is not None:
+	if sensor[key]:
           print_log('Type = '+sensor_type+', ID = '+sensor_id+', Param = '+key+', Value = '+sensor[key])
           submit_data(sensor_type,sensor_id,key,sensor[key])
         else: