#part-handler
import base64
def list_types(): return(["application/octet-stream"])
def handle_part(data,ctype,filename,payload): if ctype == "__end__" or ctype == "__begin__": return if ctype == "application/octet-stream": stream = "%s/%s" % ('/var/lib/cloud/instance/scripts',filename) f = open(stream, 'wb') f.write(base64.b64decode(base64.b64decode(payload))) f.close()
#part-handler
import base64
def list_types(): ["application/ octet-stream" ])
return(
def handle_ part(data, ctype,filename, payload) : octet-stream" : lib/cloud/ instance/ scripts' ,filename)
f.write( base64. b64decode( base64. b64decode( payload) ))
if ctype == "__end__" or ctype == "__begin__": return
if ctype == "application/
stream = "%s/%s" % ('/var/
f = open(stream, 'wb')
f.close()