Add newlines in the log file

This commit is contained in:
Daniel Demus 2023-08-01 12:57:54 +02:00
parent 4b7cc39758
commit 2e76cf82c9

View File

@ -130,6 +130,5 @@ class Downloader(ABC):
for fn in fs if fn.endswith(self.extensions)]
def write_log(self, src, fname, size):
o = open(self.log_path, "at")
o.write(src.ljust(100) + fname.ljust(50) + str(size).ljust(16))
o.close()
with open(self.log_path, "at") as o:
o.write(src.ljust(100) + fname.ljust(50) + str(size).ljust(16) + '\n')