diff options
author | Jeix <devnull@localhost> | 2010-08-13 11:03:44 +0200 |
---|---|---|
committer | Jeix <devnull@localhost> | 2010-08-13 11:03:44 +0200 |
commit | b1cc10a0f5ea6c9cb8231c67dd016fe4a2414170 (patch) | |
tree | af31f7d3c6efb49a2afe905d4971001417299c03 /module/plugins/Plugin.py | |
parent | irchook-xmlrpc fix (diff) | |
parent | improvements (diff) | |
download | pyload-b1cc10a0f5ea6c9cb8231c67dd016fe4a2414170.tar.xz |
Merge
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 8 |
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): |