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:
Sebastian Spaeth
2012-02-05 11:31:54 +01:00
parent 0844d27f9f
commit 55da31c84b
6 changed files with 10 additions and 10 deletions

View File

@ -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" %