diff --git a/brmdoor_nfc_daemon.py b/brmdoor_nfc_daemon.py index 61b5635..ec5dbe2 100755 --- a/brmdoor_nfc_daemon.py +++ b/brmdoor_nfc_daemon.py @@ -389,11 +389,12 @@ class SpaceAPIUploader(object): spaceApiJson["state"] = {"open": True, "lastchange": time.time()} with tempfile.NamedTemporaryFile() as tf: - json.dump(spaceApiJson, tf) + json.dump(spaceApiJson, tf, indent=4, ensure_ascii=True, encoding='utf-8') + tf.flush() localFilename = tf.name with pysftp.Connection(self.config.sftpHost, username=self.config.sftpUsername, port=self.config.sftpPort, private_key=self.config.sftpKey) as sftp: - sftp.timeout = 30 + sftp.timeout = 15 with sftp.cd(dirname): sftp.put(localFilename, remotepath=targetFname) diff --git a/spaceapi_template.json b/spaceapi_template.json index d20b500..2392582 100644 --- a/spaceapi_template.json +++ b/spaceapi_template.json @@ -4,7 +4,7 @@ "logo": "https://brmlab.cz/brmlab.png", "url": "https://brmlab.cz/", "location": { - "address": "Pod Kaplickou 3149/18, 13000 Praha 3", + "address": "Pod Kapličkou 3149/18, 13000 Praha 3", "lon": 50.08346, "lat": 14.48032 },