summaryrefslogtreecommitdiffstats
path: root/module/plugins/Plugin.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-08-13 11:03:44 +0200
committerGravatar Jeix <devnull@localhost> 2010-08-13 11:03:44 +0200
commitb1cc10a0f5ea6c9cb8231c67dd016fe4a2414170 (patch)
treeaf31f7d3c6efb49a2afe905d4971001417299c03 /module/plugins/Plugin.py
parentirchook-xmlrpc fix (diff)
parentimprovements (diff)
downloadpyload-b1cc10a0f5ea6c9cb8231c67dd016fe4a2414170.tar.xz
Merge
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):