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

« back to all changes in this revision

Viewing changes to tests/unittests/test_datasource/test_altcloud.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:
46
46
    cifile = open(cloudinit.sources.DataSourceAltCloud.CLOUD_INFO_FILE, 'w')
47
47
    cifile.write(value)
48
48
    cifile.close()
49
 
    os.chmod(cloudinit.sources.DataSourceAltCloud.CLOUD_INFO_FILE, 0664)
 
49
    os.chmod(cloudinit.sources.DataSourceAltCloud.CLOUD_INFO_FILE, 0o664)
50
50
 
51
51
 
52
52
def _remove_cloud_info_file():
67
67
    udfile = open(deltacloud_user_data_file, 'w')
68
68
    udfile.write(value)
69
69
    udfile.close()
70
 
    os.chmod(deltacloud_user_data_file, 0664)
 
70
    os.chmod(deltacloud_user_data_file, 0o664)
71
71
 
72
72
    udfile = open(user_data_file, 'w')
73
73
    udfile.write(value)
74
74
    udfile.close()
75
 
    os.chmod(user_data_file, 0664)
 
75
    os.chmod(user_data_file, 0o664)
76
76
 
77
77
 
78
78
def _remove_user_data_files(mount_dir,