summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-06-21 14:37:23 -0400
committerScott Moser <smoser@ubuntu.com>2016-06-21 14:37:23 -0400
commit94244b4b2375ae1aba1167dd2b03b1227bad89e3 (patch)
treeecc28dab5c4dc8526c23f1fd2aa017942d66415f
parentb53561c9b32fdb2630f19082fb2a57cd44013030 (diff)
downloadcloud-init-94244b4b2375ae1aba1167dd2b03b1227bad89e3.tar.gz
write_files: if no permissions are given, just use default without warn.
if no permissions were given in a write_files stanza, then a warning would be emitted. The fix here is just to special case handling of None.
-rw-r--r--ChangeLog1
-rw-r--r--cloudinit/config/cc_write_files.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 10bd58b8..8edf3249 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -124,6 +124,7 @@
- Change missing Cheetah log warning to debug [Andrew Jorgensen]
- Remove trailing dot from GCE metadata URL (LP: #1581200) [Phil Roche]
- support network rendering to sysconfig (for centos and RHEL)
+ - write_files: if no permissions are given, just use default without warn.
0.7.6:
- open 0.7.6
diff --git a/cloudinit/config/cc_write_files.py b/cloudinit/config/cc_write_files.py
index 351cfc8c..b1096b9b 100644
--- a/cloudinit/config/cc_write_files.py
+++ b/cloudinit/config/cc_write_files.py
@@ -79,6 +79,8 @@ def write_files(name, files, log):
def decode_perms(perm, default, log):
+ if perm is None:
+ return default
try:
if isinstance(perm, six.integer_types + (float,)):
# Just 'downcast' it (if a float)