diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-11 17:21:09 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-11 17:21:09 -0700 |
commit | feeb0620b31d2d6aff59449c53a17b193a2d8d8e (patch) | |
tree | e65fc08cd16686dfbf1f65105d9751f5f4ce9412 /cloudinit | |
parent | 31f92c74b194430f6db3e69ac6960daa1646a7b8 (diff) | |
download | vyos-cloud-init-feeb0620b31d2d6aff59449c53a17b193a2d8d8e.tar.gz vyos-cloud-init-feeb0620b31d2d6aff59449c53a17b193a2d8d8e.zip |
Pylint cleanups.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/user_data/upstart_job.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cloudinit/user_data/upstart_job.py b/cloudinit/user_data/upstart_job.py index d15e66c4..568a644a 100644 --- a/cloudinit/user_data/upstart_job.py +++ b/cloudinit/user_data/upstart_job.py @@ -46,11 +46,14 @@ class UpstartJobPartHandler(ud.PartHandler): if ctype in ud.CONTENT_SIGNALS: return - filename = utils.clean_filename(filename) - (name, ext) = os.path.splitext(filename) + filename = util.clean_filename(filename) + (_name, ext) = os.path.splitext(filename) + if not ext: + ext = '' ext = ext.lower() if ext != ".conf": filename = filename + ".conf" payload = util.dos2unix(payload) - util.write_file(os.path.join(self.upstart_dir, filename), payload, 0644) + path = os.path.join(self.upstart_dir, filename) + util.write_file(path, payload, 0644) |