~smoser/cloud-init/trunk.new-ds

« back to all changes in this revision

Viewing changes to cloudinit/sources/DataSourceConfigDrive.py

  • Committer: Scott Moser
  • Date: 2015-02-11 01:53:20 UTC
  • mfrom: (1052.1.45 py2-3.smoser)
  • Revision ID: smoser@ubuntu.com-20150211015320-049dv6n1mk2in7l1
python3 support.

This gives us functional python3 support.  There are likely
still bugs, but instance boot on openstack is functional now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
    files = data.get('files', {})
217
217
    if files:
218
218
        LOG.debug("Writing %s injected files", len(files))
219
 
        for (filename, content) in files.iteritems():
 
219
        for (filename, content) in files.items():
220
220
            if not filename.startswith(os.sep):
221
221
                filename = os.sep + filename
222
222
            try:
223
 
                util.write_file(filename, content, mode=0660)
 
223
                util.write_file(filename, content, mode=0o660)
224
224
            except IOError:
225
225
                util.logexc(LOG, "Failed writing file: %s", filename)
226
226