deb-heat/heat/cloudinit/part-handler.py
Angus Salkeld dfe12cbaba Fix a heap of pep8 errors
./run_tests.sh is much cleaner now.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-16 17:07:07 +10:00

18 lines
347 B
Python

#part-handler
def list_types():
return(["text/x-cfninitdata"])
def handle_part(data, ctype, filename, payload):
if ctype == "__begin__":
return
if ctype == "__end__":
return
if ctype == 'text/x-cfninitdata':
f = open('/var/lib/cloud/data/%s' % filename, 'w')
f.write(payload)
f.close()