Code review comment for lp:~matsubara/launchpad/bug-628510-oops-permission

Revision history for this message
Gary Poster (gary) wrote :

Thank you, Diogo.

- The bit OR and AND operators are the proper ways of doing this, rather than addition and subtraction. Since the values you are manipulating are single bits, sure, addition and subtraction would work, but why not do things properly? Practically, I don't know if using addition and subtraction would ever actually bite you--that is, if these values are ever anything other than single bits--but following the docs seems like an obvious win.

- You should write a test that fails initially. Use os.umask as test set up to make the permissions different. Reinstate the umask in the test's tear down.

« Back to merge proposal