Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions intermine/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ class Query(object):

>>> for row in query.result("<format name>", size = <size>)
... print(row)


Result Processing: Results
--------------------------

Expand Down Expand Up @@ -475,7 +475,10 @@ def from_xml(cls, xml, *args, **kwargs):
def group(iterator, count):
itr = iter(iterator)
while True:
yield tuple([next(itr) for i in range(count)])
try:
yield tuple([next(itr) for i in range(count)])
except StopIteration:
return

if q.getAttribute('sortOrder') is not None:
sos = Query.SO_SPLIT_PATTERN.split(q.getAttribute('sortOrder'))
Expand Down Expand Up @@ -1882,4 +1885,3 @@ class QueryParseError(QueryError):

class ResultError(ReadableException):
pass