brown paper bag commit: always test after changing variable names
[chrisu/seepark.git] / seewasser.py
index dfed1cfa06e6fa6379045aa8fe0d9e4758936456..724beb694fef691592b7a60bb370b9d898102eb1 100755 (executable)
@@ -54,7 +54,7 @@ def readsensor(sensor_id):
 
 def writesensordatacsv(config, sensor_id, sensor_name, timestamp, value_type, value_raw, value):
     # Schreiben des csv-files
-    file = open(config.get("csv", "filename"), "a", newline = "")
+    file = open(os.path.expanduser(config.get("csv", "filename")), "a", newline = "")
     writer = csv.writer(file, dialect = "excel")
     writer.writerow([timestamp.strftime("%Y-%m-%d %H:%M"), sensor_id, sensor_name, "{:.1f}".format(value)])