When token is expired or invalid, the login() method throws a warning in search('firefox', 1, None):
RuntimeWarning: Unexpected end-group tag: Not all data was converted
message = googleplay_pb2.ResponseWrapper.FromString(response.content)
However, since it's not an exception, program is waiting on this instruction.
I found something interesting, I don't know if you find another better way to achieve it:
When token is expired or invalid, the
login()
method throws a warning insearch('firefox', 1, None)
:However, since it's not an exception, program is waiting on this instruction. I found something interesting, I don't know if you find another better way to achieve it:
https://github.com/matlink/googleplay-api/blob/0bc1382be545e7d99321cfd6b1207f9158d4c7ba/gpapi/googleplay.py#L201-L206