Fix PendingDeprecationWarning in libbmc.tools.batch

This commit is contained in:
Lucas Verney 2016-02-17 19:41:17 +01:00
부모 89b9c1ed44
커밋 0b59b46c25
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@ -8,4 +8,4 @@ with scientific papers.
# Global list of valid paper identifier types. See README.md.
__valid_identifiers__ = []
__version__ = "0.2"
__version__ = "0.2.1"

파일 보기

@ -108,7 +108,10 @@ def batch(iterable, size):
item = iter(iterable)
while True:
batch_iterator = islice(item, size)
yield chain([next(batch_iterator)], batch_iterator)
try:
yield chain([next(batch_iterator)], batch_iterator)
except StopIteration:
return
def remove_urls(text):