From 2ca7db5e4707664a4b34dacbae3f70271324a918 Mon Sep 17 00:00:00 2001 From: yvesf Date: Sun, 4 Sep 2011 19:39:55 +0200 Subject: wettermichel import: korrigiere typ bestimmung --- bin/wettermichel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') 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), -- cgit v1.2.1