From ed3f7872e92da0e114febcad4bc225d60bc4f085 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 7 Jan 2023 13:26:40 +0100 Subject: [PATCH] Expose node --- clients/ltsdb_record.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/ltsdb_record.py b/clients/ltsdb_record.py index 0ac8770..913d998 100644 --- a/clients/ltsdb_record.py +++ b/clients/ltsdb_record.py @@ -7,8 +7,9 @@ import time import requests +node = socket.gethostbyaddr(socket.gethostname())[0] + def record_observations(observations): - node = socket.gethostbyaddr(socket.gethostname())[0] for dir in (".", os.environ["HOME"] + "/.config/ltsdb", "/etc/ltsdb"): try: with open(dir + "/config.json") as fh: