diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-12 22:44:41 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-12 22:44:41 +0200 |
commit | 72abfb455275546e110e4daf811480dd47ffceea (patch) | |
tree | 4f6955a97af4600c31dffc5941a57640d81da0a3 /module/plugins/Plugin.py | |
parent | encoding fix try (diff) | |
download | pyload-72abfb455275546e110e4daf811480dd47ffceea.tar.xz |
improvements
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): |