diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index 59eb4058..e074b674 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -75,7 +75,6 @@ class BlackList: print(f"{self.green}{pkg}{self.endc}") black_conf.write(pkg + "\n") self.quit = True - black_conf.close() if self.quit: print() # new line at exit @@ -90,7 +89,6 @@ class BlackList: else: print(f"{self.red}{line}{self.endc}") self.quit = True - remove.close() if self.quit: print() # new line at exit diff --git a/slpkg/pkg/build.py b/slpkg/pkg/build.py index ad61e537..ffa56925 100644 --- a/slpkg/pkg/build.py +++ b/slpkg/pkg/build.py @@ -171,7 +171,6 @@ def log_head(path, log_file, log_time): log.write("Date : " + time.strftime("%d/%m/%Y") + "\n") log.write("Time : " + log_time + "\n\n") log.write("#" * 79 + "\n\n") - log.close() def log_end(path, log_file, sum_time): @@ -185,7 +184,6 @@ def log_end(path, log_file, sum_time): log.write(f"Total build time : {sum_time}\n") log.write(" " * 38 + "E N D\n\n") log.write("#" * 79 + "\n\n") - log.close() def build_time(start_time): diff --git a/slpkg/repositories.py b/slpkg/repositories.py index c4d4f1ed..5a77b726 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -82,7 +82,6 @@ class Repo: print("\nRepository '{0}' successfully " "removed\n".format(repo)) rem_repo = True - repos.close() if not rem_repo: print("\nRepository '{0}' doesn't exist\n".format(repo)) raise SystemExit() diff --git a/slpkg/sbo/queue.py b/slpkg/sbo/queue.py index 4e888aef..fd7547cb 100644 --- a/slpkg/sbo/queue.py +++ b/slpkg/sbo/queue.py @@ -65,7 +65,6 @@ class QueuePkgs: with open(self.queue_list, "w") as queue: for line in queue_file: queue.write(line) - queue.close() self.queued = Utils().read_file(self.queue_list) def packages(self): @@ -106,7 +105,6 @@ class QueuePkgs: else: print(f"{self.red}{pkg}{self.endc}") self.quit = True - queue.close() if self.quit: print() # new line at exit @@ -121,7 +119,6 @@ class QueuePkgs: else: print(f"{self.red}{line}{self.endc}") self.quit = True - queue.close() if self.quit: print() # new line at exit