summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/wettermichel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/wettermichel.py b/bin/wettermichel.py
index b7baaf8..4be22d7 100755
--- a/bin/wettermichel.py
+++ b/bin/wettermichel.py
@@ -38,9 +38,9 @@ def insert(sensor_name,value_int=None, value_float=None, value_string=None):
VALUES (
NOW(), :sensor_id, :type, :value_int, :value_float, :value_string)""")
conn = soup.connection()
- ttype = "int" and value_int != None or \
- "float" and value_float != None or \
- "string" and value_string != None or \
+ ttype = value_int != None and "int" or \
+ value_float != None and "float" or \
+ value_string != None and "string" or \
None
assert ttype != None, 'ttype is set'
conn.execute(sql, sensor_id=get_sensor_id(sensor_name),