Commit 1dfe43ca authored by mgiuca's avatar mgiuca Committed by Commit bot

Simplify octal constants in Python code (e.g. 0o0700 -> 0o700).

Review-Url: https://codereview.chromium.org/2075923003
parent edbf9a3e
......@@ -155,7 +155,7 @@ class GerritTestCase(unittest.TestCase):
"""Sets up the gerrit instances in a class-specific temp dir."""
# Create gerrit instance.
gerrit_dir = tempfile.mkdtemp()
os.chmod(gerrit_dir, 0o0700)
os.chmod(gerrit_dir, 0o700)
gi = cls.gerrit_instance = cls._create_gerrit_instance(gerrit_dir)
# Set netrc file for http authentication.
......@@ -188,7 +188,7 @@ class GerritTestCase(unittest.TestCase):
def setUp(self):
self.tempdir = tempfile.mkdtemp()
os.chmod(self.tempdir, 0o0700)
os.chmod(self.tempdir, 0o700)
def tearDown(self):
if TEARDOWN:
......
......@@ -240,7 +240,7 @@ class GitRepo(object):
SPECIAL_KEY: special_value,
...
"path/to/some/file": { 'data': "some data content for this file",
'mode': 0o0755 },
'mode': 0o755 },
...
}
......
......@@ -175,7 +175,7 @@ class GitReadOnlyFunctionsTest(git_test_utils.GitRepoReadOnlyTestBase,
COMMIT_C = {
'some/files/file2': {
'mode': 0o0755,
'mode': 0o755,
'data': 'file2 - vanilla\n'},
}
......@@ -750,7 +750,7 @@ class GitFreezeThaw(git_test_utils.GitRepoReadWriteTestBase):
COMMIT_C = {
'some/files/file2': {
'mode': 0o0755,
'mode': 0o755,
'data': 'file2 - vanilla'},
}
......
......@@ -232,7 +232,7 @@ class GitHyperBlameSimpleTest(GitHyperBlameTestBase):
COMMIT_B = {
'some/files/file2': {
'mode': 0o0755,
'mode': 0o755,
'data': 'file2 - vanilla\n'},
'some/files/empty': {'data': 'not anymore'},
'some/files/file3': {'data': 'file3'},
......
......@@ -528,10 +528,10 @@ class HttpRpcServer(AbstractRpcServer):
pass
else:
# Create an empty cookie file with mode 600
fd = os.open(self.cookie_file, os.O_CREAT, 0o0600)
fd = os.open(self.cookie_file, os.O_CREAT, 0o600)
os.close(fd)
# Always chmod the cookie file
os.chmod(self.cookie_file, 0o0600)
os.chmod(self.cookie_file, 0o600)
else:
# Don't save cookies across runs of update.py.
self.cookie_jar = cookielib.CookieJar()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment