← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~ajorgens/cloud-init:octal-modes into cloud-init:master

 

Andrew Jorgensen has proposed merging ~ajorgens/cloud-init:octal-modes into cloud-init:master.

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~ajorgens/cloud-init/+git/cloud-init/+merge/325424
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~ajorgens/cloud-init:octal-modes into cloud-init:master.
diff --git a/cloudinit/config/cc_write_files.py b/cloudinit/config/cc_write_files.py
index 72e1cdd..89e996c 100644
--- a/cloudinit/config/cc_write_files.py
+++ b/cloudinit/config/cc_write_files.py
@@ -119,7 +119,7 @@ def decode_perms(perm, default, log):
             # Force to string and try octal conversion
             return int(str(perm), 8)
     except (TypeError, ValueError):
-        log.warn("Undecodable permissions %s, assuming %s", perm, default)
+        log.warn("Undecodable permissions %s, assuming %o", perm, default)
         return default
 
 
diff --git a/cloudinit/util.py b/cloudinit/util.py
index b8c3e4e..c7b06ae 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1747,7 +1747,7 @@ def write_file(filename, content, mode=0o644, omode="wb", copy_mode=False):
     else:
         content = decode_binary(content)
         write_type = 'characters'
-    LOG.debug("Writing to %s - %s: [%s] %s %s",
+    LOG.debug("Writing to %s - %s: [%o] %s %s",
               filename, omode, mode, len(content), write_type)
     with SeLinuxGuard(path=filename):
         with open(filename, omode) as fh:

Follow ups