~harlowja/cloud-init/death-to-paths

« back to all changes in this revision

Viewing changes to cloudinit/config/cc_set_passwords.py

  • Committer: Joshua Harlow
  • Date: 2012-09-02 18:56:52 UTC
  • Revision ID: harlowja@yahoo-inc.com-20120902185652-6aa2h0c642xzo7rb
Remove the usage of the paths.join(t/f) function
which seems to actually cause more pain that giving
any benefit, revert back to just using os.path...

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
        replaced_auth = False
118
118
 
119
119
        # See: man sshd_config
120
 
        conf_fn = cloud.paths.join(True, ssh_util.DEF_SSHD_CFG)
121
 
        old_lines = ssh_util.parse_ssh_config(conf_fn)
 
120
        old_lines = ssh_util.parse_ssh_config(ssh_util.DEF_SSHD_CFG)
122
121
        new_lines = []
123
122
        i = 0
124
123
        for (i, line) in enumerate(old_lines):
137
136
                                                     pw_auth))
138
137
 
139
138
        lines = [str(e) for e in new_lines]
140
 
        ssh_rw_fn = cloud.paths.join(False, ssh_util.DEF_SSHD_CFG)
141
 
        util.write_file(ssh_rw_fn, "\n".join(lines))
 
139
        util.write_file(ssh_util.DEF_SSHD_CFG, "\n".join(lines))
142
140
 
143
141
        try:
144
142
            cmd = ['service']