summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-14 22:33:41 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-14 22:33:41 +0200
commit67fb22b2f84aa9d3f8a8a966932f6191db7ead00 (patch)
tree83e83c506f4e08a94584543f4bd4876d4e11cbc4 /module
parentfixed download aborting #2 (diff)
downloadpyload-67fb22b2f84aa9d3f8a8a966932f6191db7ead00.tar.xz
clsoed #352
Diffstat (limited to 'module')
-rw-r--r--module/ConfigParser.py2
-rw-r--r--module/network/HTTPChunk.py4
-rw-r--r--module/plugins/PluginManager.py5
3 files changed, 8 insertions, 3 deletions
diff --git a/module/ConfigParser.py b/module/ConfigParser.py
index 2a3469b21..1d24711ee 100644
--- a/module/ConfigParser.py
+++ b/module/ConfigParser.py
@@ -345,7 +345,7 @@ class ConfigParser:
if name in self.plugin:
del self.plugin[name]
-########################################################################
+
class Section:
"""provides dictionary like access for configparser"""
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py
index cf77ccae6..0fee75682 100644
--- a/module/network/HTTPChunk.py
+++ b/module/network/HTTPChunk.py
@@ -16,7 +16,7 @@
@author: RaNaN
"""
-from os import remove
+from os import remove, stat
from os.path import exists
from time import sleep
from re import search
@@ -157,6 +157,8 @@ class HTTPChunk(HTTPRequest):
if self.resume:
self.fp = open(self.p.info.getChunkName(self.id), "ab")
self.arrived = self.fp.tell()
+ if not self.arrived:
+ self.arrived = stat(self.p.info.getChunkName(self.id)).st_size
if self.range:
#do nothing if chunk already finished
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py
index 333f9e247..94c20cd5a 100644
--- a/module/plugins/PluginManager.py
+++ b/module/plugins/PluginManager.py
@@ -182,7 +182,10 @@ class PluginManager():
if folder == "hooks":
config.append(["load", "bool", "Load on startup", True if name not in NO_AUTOLOAD else False])
- self.core.config.addPluginConfig(name, config, desc)
+ try:
+ self.core.config.addPluginConfig(name, config, desc)
+ except :
+ self.log.error("Invalid config in %s: %s" % (name, config))
if not home:
temp = self.parse(typ, folder, create, pattern, plugins)