- c = database.cursor()
- c.execute('CALL meteo.submit_mqtt(%s,%s,%s,%s,NULL)', (topic,sensor_type,param,value))
- database.commit()
- print topic,sensor_type,param,value
+ try:
+ c = database.cursor()
+ c.execute('CALL meteo.submit_mqtt(%s,%s,%s,%s,NULL)', (topic,sensor_type,param,value))
+ database.commit()
+ print topic,sensor_type,param,value
+ except:
+ print "Failed to submit data"