Commit f4a8cbac authored by Julien Muchembled's avatar Julien Muchembled

Fix shebang workaround on Python 3

This fixes up commit d5199b9d
("Add support for Python 3").
parent 4e38cc88
Pipeline #18602 running with stage
......@@ -334,7 +334,7 @@ echo %s
continue
with open(f_abspath, 'rb') as f:
header = f.readline(128)
if header.startswith(b'#!') and header[-1] != b'\n':
if header.startswith(b'#!') and header[-1:] != b'\n':
os.rename(f_abspath, f_abspath + '.shebang')
with open(f_abspath, 'w') as f:
os.fchmod(f.fileno(), stat.S_IMODE(st_mode))
......
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