summaryrefslogtreecommitdiffstats
path: root/module/plugins/Plugin.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-12 22:44:41 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-12 22:44:41 +0200
commit72abfb455275546e110e4daf811480dd47ffceea (patch)
tree4f6955a97af4600c31dffc5941a57640d81da0a3 /module/plugins/Plugin.py
parentencoding fix try (diff)
downloadpyload-72abfb455275546e110e4daf811480dd47ffceea.tar.xz
improvements
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r--module/plugins/Plugin.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 04a5adb91..02a15dfbc 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -34,6 +34,14 @@ from os import makedirs
from tempfile import NamedTemporaryFile
from mimetypes import guess_type
+from itertools import islice
+
+def chunks(iterable, size):
+ it = iter(iterable)
+ item = list(islice(it, size))
+ while item:
+ yield item
+ item = list(islice(it, size))
def dec(func):
def new(*args):