mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
PY3: fix some octal literals
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
4038e7bd8b
commit
3cc284b2af
@ -795,7 +795,7 @@ sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"])
|
||||
installed_file.write(newline)
|
||||
lineno = lineno + 1
|
||||
installed_file.close()
|
||||
os.chmod(installed_location, 0755)
|
||||
os.chmod(installed_location, 0o755)
|
||||
return 0
|
||||
|
||||
def copy_and_fix_perl_path(task):
|
||||
@ -823,7 +823,7 @@ def copy_and_fix_perl_path(task):
|
||||
installed_file.write(newline)
|
||||
lineno = lineno + 1
|
||||
installed_file.close()
|
||||
os.chmod(installed_location, 0755)
|
||||
os.chmod(installed_location, 0o755)
|
||||
return 0
|
||||
|
||||
|
||||
|
22
ctdb/wscript
22
ctdb/wscript
@ -736,14 +736,14 @@ def build(bld):
|
||||
target='onnode',
|
||||
rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline))
|
||||
bld.INSTALL_FILES('${BINDIR}', 'onnode',
|
||||
destname='onnode', chmod=0755)
|
||||
destname='onnode', chmod=0o755)
|
||||
|
||||
bld.SAMBA_GENERATOR('ctdb-diagnostics',
|
||||
source='tools/ctdb_diagnostics',
|
||||
target='ctdb_diagnostics',
|
||||
rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline))
|
||||
bld.INSTALL_FILES('${BINDIR}', 'ctdb_diagnostics',
|
||||
destname='ctdb_diagnostics', chmod=0755)
|
||||
destname='ctdb_diagnostics', chmod=0o755)
|
||||
|
||||
if bld.env.etcd_reclock:
|
||||
bld.SAMBA_GENERATOR('ctdb-etcd-lock',
|
||||
@ -751,35 +751,35 @@ def build(bld):
|
||||
target='ctdb_etcd_lock',
|
||||
rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline))
|
||||
bld.INSTALL_FILES('${CTDB_HELPER_BINDIR}', 'ctdb_etcd_lock',
|
||||
destname='ctdb_etcd_lock', chmod=0744)
|
||||
destname='ctdb_etcd_lock', chmod=0o744)
|
||||
|
||||
bld.SAMBA_GENERATOR('ctdb-natgw',
|
||||
source='tools/ctdb_natgw',
|
||||
target='ctdb_natgw',
|
||||
rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline))
|
||||
bld.INSTALL_FILES('${CTDB_HELPER_BINDIR}', 'ctdb_natgw',
|
||||
destname='ctdb_natgw', chmod=0755)
|
||||
destname='ctdb_natgw', chmod=0o755)
|
||||
|
||||
bld.SAMBA_GENERATOR('ctdb-lvs',
|
||||
source='tools/ctdb_lvs',
|
||||
target='ctdb_lvs',
|
||||
rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline))
|
||||
bld.INSTALL_FILES('${CTDB_HELPER_BINDIR}', 'ctdb_lvs',
|
||||
destname='ctdb_lvs', chmod=0755)
|
||||
destname='ctdb_lvs', chmod=0o755)
|
||||
|
||||
bld.SAMBA_GENERATOR('ctdbd-wrapper',
|
||||
source='config/ctdbd_wrapper',
|
||||
target='ctdbd_wrapper',
|
||||
rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline))
|
||||
bld.INSTALL_FILES('${SBINDIR}', 'ctdbd_wrapper',
|
||||
destname='ctdbd_wrapper', chmod=0755)
|
||||
destname='ctdbd_wrapper', chmod=0o755)
|
||||
|
||||
def SUBDIR_MODE_callback(arg, dirname, fnames):
|
||||
for f in fnames:
|
||||
fl = os.path.join(dirname, f)
|
||||
if os.path.isdir(fl) or os.path.islink(fl):
|
||||
continue
|
||||
mode = os.lstat(fl).st_mode & 0777
|
||||
mode = os.lstat(fl).st_mode & 0o777
|
||||
if arg['trim_path']:
|
||||
fl = samba_utils.os_path_relpath(fl, arg['trim_path'])
|
||||
arg['file_list'].append([fl, mode])
|
||||
@ -851,7 +851,7 @@ def build(bld):
|
||||
|
||||
for t in etc_scripts:
|
||||
bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/%s' % t,
|
||||
destname=t, chmod=0755)
|
||||
destname=t, chmod=0o755)
|
||||
|
||||
bld.SAMBA_GENERATOR('ctdb-sudoers',
|
||||
source='config/ctdb.sudoers',
|
||||
@ -1091,7 +1091,7 @@ def build(bld):
|
||||
target='test_wrap',
|
||||
rule='sed -e "%s" ${SRC} > ${TGT}' % sed_expr)
|
||||
bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR+"/scripts", 'test_wrap',
|
||||
destname='test_wrap', chmod=0755)
|
||||
destname='test_wrap', chmod=0o755)
|
||||
|
||||
bld.SAMBA_GENERATOR('ctdb-test-script-install-paths',
|
||||
source='tests/scripts/script_install_paths.sh',
|
||||
@ -1099,7 +1099,7 @@ def build(bld):
|
||||
rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline))
|
||||
bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR+"/scripts",
|
||||
'script_install_paths.sh',
|
||||
destname='script_install_paths.sh', chmod=0644)
|
||||
destname='script_install_paths.sh', chmod=0o644)
|
||||
|
||||
sed_expr1 = 's@^\(export %s\)=.*@\\1=%s\\nexport %s=\"%s\"@''' % (
|
||||
'CTDB_TEST_DIR', bld.env.CTDB_TEST_DATADIR,
|
||||
@ -1111,7 +1111,7 @@ def build(bld):
|
||||
rule='sed -e "%s" -e "%s" ${SRC} > ${TGT}' % (
|
||||
sed_expr1, sed_expr2))
|
||||
bld.INSTALL_FILES('${BINDIR}', 'ctdb_run_tests.sh',
|
||||
destname='ctdb_run_tests', chmod=0755)
|
||||
destname='ctdb_run_tests', chmod=0o755)
|
||||
bld.symlink_as(os.path.join(bld.env.BINDIR, 'ctdb_run_cluster_tests'),
|
||||
'ctdb_run_tests')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user