octal notation 0700 -> 0o700
Use octal notation that python3 understands. Works >=python2.6 Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
@ -37,7 +37,7 @@ class MaildirRepository(BaseRepository):
|
||||
|
||||
# Create the top-level folder if it doesn't exist
|
||||
if not os.path.isdir(self.root):
|
||||
os.mkdir(self.root, 0700)
|
||||
os.mkdir(self.root, 0o700)
|
||||
|
||||
def _append_folder_atimes(self, foldername):
|
||||
"""Store the atimes of a folder's new|cur in self.folder_atimes"""
|
||||
@ -97,7 +97,7 @@ class MaildirRepository(BaseRepository):
|
||||
# sub-folders may be created before higher-up ones.
|
||||
self.debug("makefolder: calling makedirs '%s'" % full_path)
|
||||
try:
|
||||
os.makedirs(full_path, 0700)
|
||||
os.makedirs(full_path, 0o700)
|
||||
except OSError as e:
|
||||
if e.errno == 17 and os.path.isdir(full_path):
|
||||
self.debug("makefolder: '%s' already a directory" % foldername)
|
||||
@ -105,7 +105,7 @@ class MaildirRepository(BaseRepository):
|
||||
raise
|
||||
for subdir in ['cur', 'new', 'tmp']:
|
||||
try:
|
||||
os.mkdir(os.path.join(full_path, subdir), 0700)
|
||||
os.mkdir(os.path.join(full_path, subdir), 0o700)
|
||||
except OSError as e:
|
||||
if e.errno == 17 and os.path.isdir(full_path):
|
||||
self.debug("makefolder: '%s' already has subdir %s" %
|
||||
|
Reference in New Issue
Block a user