Code review comment for ~ajorgens/cloud-init:octal-modes

Revision history for this message
Scott Moser (smoser) wrote :

Andrew,

Thanks for re-submitting this MP.

I've reviewed a little bit and found a few things
a.) as seen in the c-i logs, the change to 'decode_perms' can fail if the input was a string.
  >>> "%o" % "0755"
  TypeError: %o format: an integer is required, not str

b.) it seems to have exposed an error in append_file() that i'm not sure how it ever worked.

For your MP to be accepted, we need to fix 'a'

I've put a suggested change like:
 http://paste.ubuntu.com/24841624/

Basically that just tries to do '%o' but uses '%r' if that fails.

Thoughts?

review: Needs Fixing

« Back to merge proposal