bts
This commit is contained in:
parent
f7c3f95314
commit
ea8c5085b9
@ -93,14 +93,13 @@ class BaseTester:
|
|||||||
print("Container created")
|
print("Container created")
|
||||||
for file in ExtraFile.objects.filter(task=self.solution.task):
|
for file in ExtraFile.objects.filter(task=self.solution.task):
|
||||||
with open(
|
with open(
|
||||||
join(self.path, file.filename), "wb"
|
join(self.path, file.filename), "w" if file.filename == 'checker.sh' else 'wb'
|
||||||
) as fs:
|
) as fs:
|
||||||
bts = get_bytes(file.fs_id)
|
bts = get_bytes(file.fs_id)
|
||||||
if file.filename == 'checker.sh':
|
if file.filename == 'checker.sh':
|
||||||
bts = bts.replace(b"\r\n", b"\n")
|
fs.write(bts.decode("utf-8"))
|
||||||
else:
|
else:
|
||||||
bts = bts.replace(b"\r\n", b"\n")
|
fs.write(bts)
|
||||||
fs.write(bts)
|
|
||||||
print("Files copied")
|
print("Files copied")
|
||||||
for file in listdir(self.path):
|
for file in listdir(self.path):
|
||||||
chmod(join(self.path, file), 0o777)
|
chmod(join(self.path, file), 0o777)
|
||||||
|
Loading…
Reference in New Issue
Block a user