summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2011-09-04 19:39:55 +0200
committeryvesf <yvesf-git@xapek.org>2011-09-04 19:39:55 +0200
commit2ca7db5e4707664a4b34dacbae3f70271324a918 (patch)
tree631aa86f3baf5f2a0844a43d298b3c2405527c31 /bin
parent651aebaaaa33883269a17f9c515694472e5ae29d (diff)
downloadebus-alt-2ca7db5e4707664a4b34dacbae3f70271324a918.tar.gz
ebus-alt-2ca7db5e4707664a4b34dacbae3f70271324a918.zip
wettermichel import: korrigiere typ bestimmung
Diffstat (limited to 'bin')
-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),