From ed3b4cd5e100b5df44b45c55a00d49b208cb0a11 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 14 Nov 2010 14:08:38 +0100 Subject: LinkList fix, update fix, crypter fix --- pyLoadCore.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index 29b77b13a..2c643e16b 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -354,25 +354,16 @@ class Core(object): if exists(link_file): f = open(link_file, "rb") - links = [x.strip() for x in f.readlines() if x.strip()] - if links: - self.server_methods.add_package("links.txt", links, 1) - f.close() - try: - f = open(link_file, "wb") - f.close() - except: - self.log.warning(_("links.txt could not be cleared")) + if f.read().strip(): + self.server_methods.add_package("links.txt", [link_file], 1) + f.close() link_file = "links.txt" if exists(link_file): f = open(link_file, "rb") - links = [x.strip() for x in f.readlines() if x.strip()] - if links: - self.server_methods.add_package("links.txt", links, 1) - f.close() - f = open(link_file, "wb") - f.close() + if f.read().strip(): + self.server_methods.add_package("links.txt", [link_file], 1) + f.close() self.scheduler.addJob(0, self.accountManager.getAccountInfos) -- cgit v1.2.3