]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: convert some functions to use write_new
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 6 Jun 2023 00:12:59 +0000 (20:12 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 6 Jun 2023 18:16:36 +0000 (14:16 -0400)
commit300f5bfcb5dd16ba916951bab90c95a1b76d07f4
tree35aebc9f7d7763a17c20c41399d05081c8e88f25
parent02b6ce8a44f234aa3fe30fe21d6f28d4e36d7af5
cephadm: convert some functions to use write_new

Convert a lot of the basic uses of the pattern:
with open(...) as f:
  f.write(...)
  os.fchown(f, ...)  # sometimes
  os.fchmod(f, ...)  # sometimes
  os.rename(...)   # sometimes

These are the most obvious cases to convert to `write_new`
and should largely be uncontroversial.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py