This commit is contained in:
parent
3430109353
commit
e5b9d45a59
4
main.py
4
main.py
|
@ -142,9 +142,7 @@ class CloudInitApp:
|
||||||
filepath = os.path.join(PATH, "data", data['local-hostname'], META_DATA_FILENAME)
|
filepath = os.path.join(PATH, "data", data['local-hostname'], META_DATA_FILENAME)
|
||||||
if os.path.exists(filepath):
|
if os.path.exists(filepath):
|
||||||
with open(filepath, "r") as metadata:
|
with open(filepath, "r") as metadata:
|
||||||
for line in metadata.readlines():
|
data.update(yaml.safe_load(metadata))
|
||||||
linesplit = list(map(lambda k: k.strip(), line.split(":")))
|
|
||||||
data[linesplit[0]] = linesplit[1]
|
|
||||||
|
|
||||||
cherrypy.response.headers['Content-Type'] = \
|
cherrypy.response.headers['Content-Type'] = \
|
||||||
'text/yaml'
|
'text/yaml'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user