summaryrefslogtreecommitdiffstats
path: root/Core.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-11 13:31:01 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-11 13:31:01 +0200
commitace4ced0f245c98f0ded17bed5cf293dca51c5e0 (patch)
treee55a5d483bd41435e5a07959f85630e25598e209 /Core.py
parentmerged (diff)
downloadpyload-ace4ced0f245c98f0ded17bed5cf293dca51c5e0.tar.xz
~DLC Support~ , closed #10
Diffstat (limited to 'Core.py')
-rw-r--r--Core.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Core.py b/Core.py
index 3bd24975c..d4cd3b588 100644
--- a/Core.py
+++ b/Core.py
@@ -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")