Skip to content

Commit

Permalink
search: fixed wrong doc check
Browse files Browse the repository at this point in the history
  • Loading branch information
Domenico Iezzi committed Nov 5, 2017
1 parent 11128cd commit 6a3926f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gpapi/googleplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,9 @@ def search(self, query, nb_result, offset=None):
raise LoginError('Unexpected behaviour, probably expired '
'token')
cluster = response.payload.listResponse.cluster[0]
try:
cluster.HasField('doc')
except ValueError as e:
if self.debug:
print('No result for query: %s' % query)
print(cluster.doc)
if len(cluster.doc) == 0:
print('No results for query %s' % query)
break
if cluster.doc[0].containerMetadata.nextPageUrl != "":
nextPath = cluster.doc[0].containerMetadata.nextPageUrl
Expand Down

0 comments on commit 6a3926f

Please # to comment.