diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-14 14:08:38 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-14 14:08:38 +0100 |
commit | ed3b4cd5e100b5df44b45c55a00d49b208cb0a11 (patch) | |
tree | 5f1a9ea5ae0cc7507413aeb707a92c277ada7e65 /pyLoadCore.py | |
parent | prevent more than one pyload instance, -q, --quit option (diff) | |
download | pyload-ed3b4cd5e100b5df44b45c55a00d49b208cb0a11.tar.xz |
LinkList fix, update fix, crypter fix
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 21 |
1 files changed, 6 insertions, 15 deletions
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) |