From 1a4e9a7ceaa82558b0dea0ee05139deb14942c77 Mon Sep 17 00:00:00 2001 From: Jeix Date: Sun, 20 Jun 2010 14:36:15 +0200 Subject: workaround for ExternalScripts.py package location --- module/plugins/hooks/ExternalScripts.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'module/plugins/hooks/ExternalScripts.py') diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index 6a45cdace..a49a007f1 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -22,6 +22,7 @@ from module.plugins.Hook import Hook import subprocess from os import listdir, sep from os.path import join +import sys class ExternalScripts(Hook): __name__ = "ExternalScripts" @@ -81,8 +82,13 @@ class ExternalScripts(Hook): def packageFinished(self, pypack): for script in self.scripts['package_finished']: + folder = self.core.config['general']['download_folder'] + if pypack.data["package_name"] != (self.core.config['general']['link_file']) and self.core.xmlconfig.get("general", "folder_per_package", False): + folder = join(folder.decode(sys.getfilesystemencoding()), pypack.data["package_name"].decode(sys.getfilesystemencoding())) + + print folder try: - out = subprocess.Popen([join(self.folder, 'package_finished', script), pypack.data['package_name'], pypack.data['folder']], stdout=subprocess.PIPE) + out = subprocess.Popen([join(self.folder, 'package_finished', script), pypack.data['package_name'], folder], stdout=subprocess.PIPE) except: pass -- cgit v1.2.3