Use 0oNNN octal syntax

This syntax is valid in Python 2.6+ and 3.x.
This commit is contained in:
Marius Gedminas 2015-08-27 09:18:56 +03:00
parent 47b088504d
commit 0eb538df03
2 changed files with 2 additions and 2 deletions

View file

@ -70,7 +70,7 @@ class ShellModule(object):
# change the umask in a subshell to achieve the desired mode
# also for directories created with `mkdir -p`
if mode:
tmp_umask = 0777 & ~mode
tmp_umask = 0o777 & ~mode
cmd = '(umask %o && %s)' % (tmp_umask, cmd)
return cmd