From a737cbdcdb70fb7dfcee46b21dda7bdb572c6214 Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Mon, 30 May 2016 14:16:11 -0700 Subject: [PATCH] Python 3 Fix: use proper octal notation Python3 requires octal notation such as 0o755. Use this as the compatible syntax instead of the old 0755 syntax for octal. Change-Id: I0ff2f62ba4b865531adbeba66beec9b7efdc22b4 --- zuul/launcher/ansiblelaunchserver.py | 2 +- zuul/merger/merger.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zuul/launcher/ansiblelaunchserver.py b/zuul/launcher/ansiblelaunchserver.py index 5ecc954a48..6fa78b98b6 100644 --- a/zuul/launcher/ansiblelaunchserver.py +++ b/zuul/launcher/ansiblelaunchserver.py @@ -797,7 +797,7 @@ class NodeWorker(object): remote_path = os.path.join('/tmp', script_fn) copy = dict(src=script_path, dest=remote_path, - mode=0555) + mode=0o555) task = dict(copy=copy) tasks.append(task) diff --git a/zuul/merger/merger.py b/zuul/merger/merger.py index c6ae35d79a..3bc29e61ac 100644 --- a/zuul/merger/merger.py +++ b/zuul/merger/merger.py @@ -210,7 +210,7 @@ class Merger(object): fd.write('#!/bin/bash\n') fd.write('ssh -i %s $@\n' % key) fd.close() - os.chmod(name, 0755) + os.chmod(name, 0o755) def addProject(self, project, url): repo = None