Fixing wrong comparison in retry.py

Change-Id: I12254834558823fe02ce1eebfa1cfc525a091f61