diff --git a/rhodecode/apps/channelstream/__init__.py b/rhodecode/apps/channelstream/__init__.py --- a/rhodecode/apps/channelstream/__init__.py +++ b/rhodecode/apps/channelstream/__init__.py @@ -63,7 +63,7 @@ def maybe_create_history_store(event): settings = event.app.registry.settings history_dir = settings.get('channelstream.history.location', '') if history_dir and not os.path.exists(history_dir): - os.makedirs(history_dir, 0750) + os.makedirs(history_dir, 0o750) def includeme(config): diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -476,7 +476,7 @@ def _sanitize_cache_settings(settings): # ensure we have our dir created if not os.path.isdir(default_cache_dir): - os.makedirs(default_cache_dir, mode=0755) + os.makedirs(default_cache_dir, mode=0o755) # exception store cache _string_setting( diff --git a/rhodecode/lib/vcs/backends/base.py b/rhodecode/lib/vcs/backends/base.py --- a/rhodecode/lib/vcs/backends/base.py +++ b/rhodecode/lib/vcs/backends/base.py @@ -50,8 +50,8 @@ from rhodecode.lib.vcs.exceptions import log = logging.getLogger(__name__) -FILEMODE_DEFAULT = 0100644 -FILEMODE_EXECUTABLE = 0100755 +FILEMODE_DEFAULT = 0o100644 +FILEMODE_EXECUTABLE = 0o100755 Reference = collections.namedtuple('Reference', ('type', 'name', 'commit_id')) MergeResponse = collections.namedtuple( @@ -209,7 +209,7 @@ class BaseRepository(object): def get_create_shadow_cache_pr_path(self, db_repo): path = db_repo.cached_diffs_dir if not os.path.exists(path): - os.makedirs(path, 0755) + os.makedirs(path, 0o755) return path @classmethod @@ -1046,7 +1046,7 @@ class BaseCommit(object): ('tags', ','.join(self.tags)), ] meta = ["%s:%s" % (f_name, value) for f_name, value in metadata] - file_info.append(('.archival.txt', 0644, False, '\n'.join(meta))) + file_info.append(('.archival.txt', 0o644, False, '\n'.join(meta))) connection.Hg.archive_repo(file_path, mtime, file_info, kind) diff --git a/rhodecode/lib/vcs/backends/git/repository.py b/rhodecode/lib/vcs/backends/git/repository.py --- a/rhodecode/lib/vcs/backends/git/repository.py +++ b/rhodecode/lib/vcs/backends/git/repository.py @@ -161,7 +161,7 @@ class GitRepository(BaseRepository): GitRepository.check_url(src_url, self.config) if create: - os.makedirs(self.path, mode=0755) + os.makedirs(self.path, mode=0o755) if bare: self._remote.init_bare() diff --git a/rhodecode/lib/vcs/backends/hg/repository.py b/rhodecode/lib/vcs/backends/hg/repository.py --- a/rhodecode/lib/vcs/backends/hg/repository.py +++ b/rhodecode/lib/vcs/backends/hg/repository.py @@ -355,7 +355,7 @@ class MercurialRepository(BaseRepository create = False if create: - os.makedirs(self.path, mode=0755) + os.makedirs(self.path, mode=0o755) self._remote.localrepository(create) diff --git a/rhodecode/model/repo_group.py b/rhodecode/model/repo_group.py --- a/rhodecode/model/repo_group.py +++ b/rhodecode/model/repo_group.py @@ -181,7 +181,7 @@ class RepoGroupModel(BaseModel): self.check_exist_filesystem(group_name) create_path = os.path.join(self.repos_path, group_name) log.debug('creating new group in %s', create_path) - os.makedirs(create_path, mode=0755) + os.makedirs(create_path, mode=0o755) log.debug('created group in %s', create_path) def _rename_group(self, old, new): diff --git a/rhodecode/tests/vcs/test_git.py b/rhodecode/tests/vcs/test_git.py --- a/rhodecode/tests/vcs/test_git.py +++ b/rhodecode/tests/vcs/test_git.py @@ -538,7 +538,7 @@ TODO: To be written... 'sys.exit(1)', ] f.write('\n'.join(script_lines)) - os.chmod(hook_path, 0755) + os.chmod(hook_path, 0o755) def test_local_push_does_not_execute_hook(self): target_repo = self.get_empty_repo() @@ -1061,7 +1061,7 @@ class TestGitSpecificWithRepo(BackendTes FileNode('foobar/static/js/admin/base.js', content='base'), FileNode( 'foobar/static/admin', content='admin', - mode=0120000), # this is a link + mode=0o120000), # this is a link FileNode('foo', content='foo'), ], }, diff --git a/rhodecode/tests/vcs/test_nodes.py b/rhodecode/tests/vcs/test_nodes.py --- a/rhodecode/tests/vcs/test_nodes.py +++ b/rhodecode/tests/vcs/test_nodes.py @@ -190,13 +190,13 @@ class TestNodeBasics: assert not mode & stat.S_IXOTH def test_file_node_is_executable(self): - node = FileNode('foobar', 'empty... almost', mode=0100755) + node = FileNode('foobar', 'empty... almost', mode=0o100755) assert node.is_executable - node = FileNode('foobar', 'empty... almost', mode=0100500) + node = FileNode('foobar', 'empty... almost', mode=0o100500) assert node.is_executable - node = FileNode('foobar', 'empty... almost', mode=0100644) + node = FileNode('foobar', 'empty... almost', mode=0o100644) assert not node.is_executable def test_file_node_is_not_symlink(self):