diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-03-14 14:16:49 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-03-14 14:16:49 -0400 |
commit | 92db1b884bf34339a4536a20123c45b01c9c49ce (patch) | |
tree | 22be0de3d0496212d26015c3b30423da9338aa5c /cloudinit/sources/DataSourceConfigDrive.py | |
parent | 91ccf1b55b5b79694449446b029dd7c4570517a5 (diff) | |
parent | 72f826bff694b612d54b177635ca7e0dc83aed2f (diff) | |
download | vyos-cloud-init-92db1b884bf34339a4536a20123c45b01c9c49ce.tar.gz vyos-cloud-init-92db1b884bf34339a4536a20123c45b01c9c49ce.zip |
merge with trunk
Diffstat (limited to 'cloudinit/sources/DataSourceConfigDrive.py')
-rw-r--r-- | cloudinit/sources/DataSourceConfigDrive.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py index 27658073..e3916208 100644 --- a/cloudinit/sources/DataSourceConfigDrive.py +++ b/cloudinit/sources/DataSourceConfigDrive.py @@ -39,7 +39,7 @@ FS_TYPES = ('vfat', 'iso9660') LABEL_TYPES = ('config-2',) POSSIBLE_MOUNTS = ('sr', 'cd') OPTICAL_DEVICES = tuple(('/dev/%s%s' % (z, i) for z in POSSIBLE_MOUNTS - for i in range(0, 2))) + for i in range(0, 2))) class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource): @@ -79,8 +79,8 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource): else: mtype = None sync = True - results = util.mount_cb(dev, read_config_drive, mtype=mtype, - sync=sync) + results = util.mount_cb(dev, read_config_drive, + mtype=mtype, sync=sync) found = dev except openstack.NonReadable: pass @@ -216,11 +216,11 @@ def on_first_boot(data, distro=None): files = data.get('files', {}) if files: LOG.debug("Writing %s injected files", len(files)) - for (filename, content) in files.iteritems(): + for (filename, content) in files.items(): if not filename.startswith(os.sep): filename = os.sep + filename try: - util.write_file(filename, content, mode=0660) + util.write_file(filename, content, mode=0o660) except IOError: util.logexc(LOG, "Failed writing file: %s", filename) |