From e86be5d91ddc9836a9e641ff07a439bb33bbc801 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 3 Sep 2010 15:47:30 +0200 Subject: netload prefetching fix --- pyLoadCore.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index 359064ba2..5d28c534e 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -200,11 +200,13 @@ class Core(object): #@TODO refractor self.check_install("Crypto", _("pycrypto to decode container files")) - self.check_install("Image", _("Python Image Libary (PIL) for captcha reading")) + img = self.check_install("Image", _("Python Image Libary (PIL) for captcha reading")) self.check_install("pycurl", _("pycurl to download any files"), True, True) self.check_install("django", _("Django for webinterface")) self.check_file("tmp", _("folder for temporary files"), True) - #self.check_install("tesseract", _("tesseract for captcha reading"), False) + #tesser = self.check_install("tesseract", _("tesseract for captcha reading"), False) + + self.captcha = img self.check_file(self.config['general']['download_folder'], _("folder for downloads"), True) self.check_file("links.txt", _("file for links")) @@ -343,9 +345,14 @@ class Core(object): else: pipe = subprocess.PIPE subprocess.Popen(check_name, stdout=pipe, stderr=pipe) + + return True except: - self.log.info(_("Install %s") % legend) - if essential: exit() + if essential: + self.log.info(_("Install %s") % legend) + exit() + + return False def check_file(self, check_names, description="", folder=False, empty=True, essential=False, quiet=False): """check wether needed files exists""" -- cgit v1.2.3