From 92d05c08633474af06ff5682468e7e5cf5c2f91b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 1 Nov 2014 18:47:26 +0100 Subject: [Crypter] Fix config handling --- module/plugins/Crypter.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'module/plugins/Crypter.py') 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 -- cgit v1.2.3