From e5b9d45a597ac426c31716551a003b58c542a7d7 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Wed, 9 Jun 2021 19:13:23 +0800 Subject: [PATCH] Allow meta-data to contain any yaml --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index b965ece..fd8f162 100644 --- a/main.py +++ b/main.py @@ -142,9 +142,7 @@ class CloudInitApp: filepath = os.path.join(PATH, "data", data['local-hostname'], META_DATA_FILENAME) if os.path.exists(filepath): with open(filepath, "r") as metadata: - for line in metadata.readlines(): - linesplit = list(map(lambda k: k.strip(), line.split(":"))) - data[linesplit[0]] = linesplit[1] + data.update(yaml.safe_load(metadata)) cherrypy.response.headers['Content-Type'] = \ 'text/yaml'