summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-03-01 19:47:27 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-03-01 19:47:27 +0100
commite4b1bc88a1e0fc88a8769860a32ccd342e278fb1 (patch)
tree8f00997a74e44808227fd73d47b71c4f6fa298b3 /pyLoadCore.py
parentwebinterface improvments + server crash fix (diff)
downloadpyload-e4b1bc88a1e0fc88a8769860a32ccd342e278fb1.tar.xz
webif. icons, storage.to fix
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py45
1 files changed, 24 insertions, 21 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 0459751cf..5a222c0d3 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -358,28 +358,31 @@ class Core(object):
self.last_update_check = time.time()
def install_update(self):
- if self.config['updates']['search_updates']:
- if self.core.config['updates']['install_updates']:
- version_check = Request().load("http://get.pyload.org/get/update/%s/" % (CURRENT_VERSION, ))
- else:
- version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION, ))
- if version_check == "":
- return False
- else:
- if self.config['updates']['install_updates']:
- try:
- tmp_zip_name = __import__("tempfile").NamedTemporaryFile(suffix=".zip").name
- tmp_zip = open(tmp_zip_name, 'wb')
- tmp_zip.write(version_check)
- tmp_zip.close()
- __import__("module.Unzip", globals(), locals(), "Unzip", -1).Unzip().extract(tmp_zip_name, "Test/")
- return True
- except:
- self.logger.info(_("Auto install Failed"))
- return False
+ try:
+ if self.config['updates']['search_updates']:
+ if self.core.config['updates']['install_updates']:
+ version_check = Request().load("http://get.pyload.org/get/update/%s/" % (CURRENT_VERSION, ))
else:
+ version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION, ))
+ if version_check == "":
return False
- else:
+ else:
+ if self.config['updates']['install_updates']:
+ try:
+ tmp_zip_name = __import__("tempfile").NamedTemporaryFile(suffix=".zip").name
+ tmp_zip = open(tmp_zip_name, 'wb')
+ tmp_zip.write(version_check)
+ tmp_zip.close()
+ __import__("module.Unzip", globals(), locals(), "Unzip", -1).Unzip().extract(tmp_zip_name, "Test/")
+ return True
+ except:
+ self.logger.info(_("Auto install Failed"))
+ return False
+ else:
+ return False
+ else:
+ return False
+ finally:
return False
def make_path(self, * args):
@@ -443,7 +446,7 @@ class ServerMethods():
for pyfile in self.core.thread_list.py_downloading:
status['speed'] += pyfile.status.get_speed()
- status['download'] = self.core.thread_list.pause and self.is_time_download()
+ status['download'] = not self.core.thread_list.pause and self.is_time_download()
status['reconnect'] = self.core.config['reconnect']['activated'] and self.is_time_reconnect()
return status