~oddbloke/cloud-init/fix-gce-az

« back to all changes in this revision

Viewing changes to cloudinit/distros/rhel.py

  • Committer: Scott Moser
  • Date: 2015-05-15 20:28:24 UTC
  • Revision ID: smoser@ubuntu.com-20150515202824-ku5wirh4gpkos5pk
pep8 fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        rhel_util.update_sysconfig_file(out_fn, locale_cfg)
134
134
 
135
135
    def _write_hostname(self, hostname, out_fn):
136
 
        # systemd will never update previous-hostname for us, so 
 
136
        # systemd will never update previous-hostname for us, so
137
137
        # we need to do it ourselves
138
138
        if self.uses_systemd() and out_fn.endswith('/previous-hostname'):
139
139
            util.write_file(out_fn, hostname)
161
161
 
162
162
    def _read_hostname(self, filename, default=None):
163
163
        if self.uses_systemd() and filename.endswith('/previous-hostname'):
164
 
            return util.load_file(filename).strip()  
 
164
            return util.load_file(filename).strip()
165
165
        elif self.uses_systemd():
166
166
            (out, _err) = util.subp(['hostname'])
167
167
            if len(out):