diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-01 18:47:26 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-01 18:47:26 +0100 |
commit | 92d05c08633474af06ff5682468e7e5cf5c2f91b (patch) | |
tree | 6cb0174bc4be49c70b45af04043a2d3b78952a97 | |
parent | [Plugin] Declare self.html as empty string, not as None type (diff) | |
download | pyload-92d05c08633474af06ff5682468e7e5cf5c2f91b.tar.xz |
[Crypter] Fix config handling
-rw-r--r-- | module/plugins/Crypter.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py index 87bde124b..e7148e11f 100644 --- a/module/plugins/Crypter.py +++ b/module/plugins/Crypter.py @@ -7,7 +7,7 @@ from module.utils import save_path class Crypter(Plugin): __name__ = "Crypter" __type__ = "crypter" - __version__ = "0.3" + __version__ = "0.4" __pattern__ = None __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), #: Overrides core.config['general']['folder_per_package'] @@ -59,10 +59,15 @@ class Crypter(Plugin): package_password = self.pyfile.package().password package_queue = self.pyfile.package().queue - use_subfolder = self.getConfig('use_subfolder') - subfolder_per_package = self.getConfig('subfolder_per_package') - folder_per_package = self.config['general']['folder_per_package'] + try: + use_subfolder = self.getConfig('use_subfolder') + except: + use_subfolder = folder_per_package + try: + subfolder_per_package = self.getConfig('subfolder_per_package') + except: + subfolder_per_package = True for pack in self.packages: name, links, folder = pack |