Use Python 3 compatible octal masks

This commit is contained in:
Petr Dlouhý 2019-04-13 20:37:39 +01:00 committed by Chris Mayo
parent 75626d456a
commit 2985e9ae65
2 changed files with 2 additions and 2 deletions

View file

@ -403,7 +403,7 @@ def make_userdir(child):
# Windows forbids filenames with leading dot unless
# a trailing dot is added.
userdir += "."
os.makedirs(userdir, 0700)
os.makedirs(userdir, 0o700)
def get_user_config():

View file

@ -90,7 +90,7 @@ class BlacklistLogger (_Logger):
"""
Write the blacklist.
"""
oldmask = os.umask(0077)
oldmask = os.umask(0o077)
for key, value in self.blacklist.items():
self.write(u"%d %s%s" % (value, repr(key), os.linesep))
self.close_fileoutput()