Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Chromium_Depot_tools
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
Chromium_Depot_tools
Commits
1dfe43ca
Commit
1dfe43ca
authored
Jun 17, 2016
by
mgiuca
Committed by
Commit bot
Jun 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify octal constants in Python code (e.g. 0o0700 -> 0o700).
Review-Url:
https://codereview.chromium.org/2075923003
parent
edbf9a3e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
gerrit_test_case.py
testing_support/gerrit_test_case.py
+2
-2
git_test_utils.py
testing_support/git_test_utils.py
+1
-1
git_common_test.py
tests/git_common_test.py
+2
-2
git_hyper_blame_test.py
tests/git_hyper_blame_test.py
+1
-1
upload.py
third_party/upload.py
+2
-2
No files found.
testing_support/gerrit_test_case.py
View file @
1dfe43ca
...
...
@@ -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
,
0o
0
700
)
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
,
0o
0
700
)
os
.
chmod
(
self
.
tempdir
,
0o700
)
def
tearDown
(
self
):
if
TEARDOWN
:
...
...
testing_support/git_test_utils.py
View file @
1dfe43ca
...
...
@@ -240,7 +240,7 @@ class GitRepo(object):
SPECIAL_KEY: special_value,
...
"path/to/some/file": { 'data': "some data content for this file",
'mode': 0o
0
755 },
'mode': 0o755 },
...
}
...
...
tests/git_common_test.py
View file @
1dfe43ca
...
...
@@ -175,7 +175,7 @@ class GitReadOnlyFunctionsTest(git_test_utils.GitRepoReadOnlyTestBase,
COMMIT_C
=
{
'some/files/file2'
:
{
'mode'
:
0o
0
755
,
'mode'
:
0o755
,
'data'
:
'file2 - vanilla
\n
'
},
}
...
...
@@ -750,7 +750,7 @@ class GitFreezeThaw(git_test_utils.GitRepoReadWriteTestBase):
COMMIT_C
=
{
'some/files/file2'
:
{
'mode'
:
0o
0
755
,
'mode'
:
0o755
,
'data'
:
'file2 - vanilla'
},
}
...
...
tests/git_hyper_blame_test.py
View file @
1dfe43ca
...
...
@@ -232,7 +232,7 @@ class GitHyperBlameSimpleTest(GitHyperBlameTestBase):
COMMIT_B
=
{
'some/files/file2'
:
{
'mode'
:
0o
0
755
,
'mode'
:
0o755
,
'data'
:
'file2 - vanilla
\n
'
},
'some/files/empty'
:
{
'data'
:
'not anymore'
},
'some/files/file3'
:
{
'data'
:
'file3'
},
...
...
third_party/upload.py
View file @
1dfe43ca
...
...
@@ -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
,
0o
0
600
)
fd
=
os
.
open
(
self
.
cookie_file
,
os
.
O_CREAT
,
0o600
)
os
.
close
(
fd
)
# Always chmod the cookie file
os
.
chmod
(
self
.
cookie_file
,
0o
0
600
)
os
.
chmod
(
self
.
cookie_file
,
0o600
)
else
:
# Don't save cookies across runs of update.py.
self
.
cookie_jar
=
cookielib
.
CookieJar
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment