packaging: setup: avoid endless loop when setVmTicket fails

- avoid endless loop when setVmTicket fails
- use private variable for range iterations
  (pylint warned about unused variable i)

Change-Id: I664fb5ce7620bda4f8e8d6d46a0b024aecae149a
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>