py3: use octal notation for file permissions

This commit is contained in:
Frédéric Péters 2020-04-18 14:46:40 +02:00
parent efb45a1b5d
commit f170c77aa6
2 changed files with 7 additions and 7 deletions

View File

@ -251,7 +251,7 @@ def prepare_build(dist, project, cmd_options, new):
if os.path.exists(project['build_dir']):
shutil.rmtree(project['build_dir'])
os.makedirs(project['build_dir'], 0755)
os.makedirs(project['build_dir'], 0o755)
if package['version'].split('-')[0].split(':')[-1] == project['version']:
# the generated changelog has the right version number, use it.
@ -304,7 +304,7 @@ def build_project(dist, arch, project, package, new):
project_build_path = os.path.join(project['build_dir'],
"%s-%s" % (project['name'], project['version']))
if not os.path.exists(pbuilder_project_result):
os.makedirs(pbuilder_project_result, 0755)
os.makedirs(pbuilder_project_result, 0o755)
os.chdir(project['lock_path'])
source_build = os.path.join(project['lock_path'],
"%s_%s_%s_%s_source.build" % (project['name'],
@ -462,7 +462,7 @@ def main():
project = get_project_infos(git_project_path, options)
if not os.path.exists(project['lock_path']):
os.mkdir(project['lock_path'], 0755)
os.mkdir(project['lock_path'], 0o755)
# compare revision between last build and now to determine if something is really new
new = 1

View File

@ -5,10 +5,10 @@ VERSION = '7'
def init():
print("+ Init EO Builder")
if not os.path.exists(settings.GIT_PATH):
os.makedirs(settings.GIT_PATH, 0755)
os.makedirs(settings.GIT_PATH, 0o755)
if not os.path.exists(settings.ORIGIN_PATH):
os.makedirs(settings.ORIGIN_PATH, 0755)
os.makedirs(settings.ORIGIN_PATH, 0o755)
if not os.path.exists(settings.PBUILDER_RESULT):
os.makedirs(settings.PBUILDER_RESULT, 0755)
os.makedirs(settings.PBUILDER_RESULT, 0o755)
if not os.path.exists(settings.LOCK_PATH):
os.makedirs(settings.LOCK_PATH, 0755)
os.makedirs(settings.LOCK_PATH, 0o755)