diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-11 13:31:01 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-11 13:31:01 +0200 |
commit | ace4ced0f245c98f0ded17bed5cf293dca51c5e0 (patch) | |
tree | e55a5d483bd41435e5a07959f85630e25598e209 /Core.py | |
parent | merged (diff) | |
download | pyload-ace4ced0f245c98f0ded17bed5cf293dca51c5e0.tar.xz |
~DLC Support~ , closed #10
Diffstat (limited to 'Core.py')
-rw-r--r-- | Core.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -85,10 +85,10 @@ class Core(object): self.config[option] = False if self.config[option].lower() == 'false' else self.config[option] def create_plugin_index(self): - for file_handler in glob(self.config['plugin_folder'] + sep + '*.py'): + for file_handler in glob(self.config['plugin_folder'] + sep + '*.py') + glob(self.config['plugin_folder'] + sep + 'DLC.pyc'): if file_handler != self.config['plugin_folder'] + sep + "Plugin.py": plugin_pattern = "" - plugin_file = basename(file_handler).replace('.py', '') + plugin_file = basename(file_handler).replace('.pyc', '').replace('.py', '') for line in open(file_handler, "r").readlines(): if "props['pattern']" in line: plugin_pattern = line.split("r\"")[1].split("\"")[0] @@ -143,7 +143,7 @@ class Core(object): def init_logger(self, level): - file_handler = logging.handlers.RotatingFileHandler(self.config['log_folder'] + sep + 'log.txt', maxBytes=102400, backupCount=self.config['log_count']) #100 kib * 5 + file_handler = logging.handlers.RotatingFileHandler(self.config['log_folder'] + sep + 'log.txt', maxBytes=102400, backupCount=int(self.config['log_count'])) #100 kib * 5 console = logging.StreamHandler(stdout) frm = logging.Formatter("%(asctime)s: %(levelname)-8s %(message)s", "%d.%m.%Y %H:%M:%S") |