diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-06-17 12:59:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 10:59:23 -0600 |
commit | 3d13a9dd469f354d0ddc1e36be37d743b5a57c73 (patch) | |
tree | eb6fbcf7f66c5c67e7703858f93369e8934b9c34 /cloudinit/atomic_helper.py | |
parent | e01e3ed5444c8093de47229e20abec440530d549 (diff) | |
download | vyos-cloud-init-3d13a9dd469f354d0ddc1e36be37d743b5a57c73.tar.gz vyos-cloud-init-3d13a9dd469f354d0ddc1e36be37d743b5a57c73.zip |
util: rename write_file's copy_mode parameter to preserve_mode (#439)
When updating the docstring to include it, I realised that the current
name is somewhat misleading; this makes it a little easier to
understand, I think.
Diffstat (limited to 'cloudinit/atomic_helper.py')
-rw-r--r-- | cloudinit/atomic_helper.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/atomic_helper.py b/cloudinit/atomic_helper.py index 1f61faa2..485ff92f 100644 --- a/cloudinit/atomic_helper.py +++ b/cloudinit/atomic_helper.py @@ -11,10 +11,10 @@ LOG = logging.getLogger(__name__) def write_file(filename, content, mode=_DEF_PERMS, - omode="wb", copy_mode=False): + omode="wb", preserve_mode=False): # open filename in mode 'omode', write content, set permissions to 'mode' - if copy_mode: + if preserve_mode: try: file_stat = os.stat(filename) mode = stat.S_IMODE(file_stat.st_mode) |