bad refactor, revert

master
George Hotz 2017-08-25 12:12:22 -07:00
parent 52e93d5a45
commit 36a259855e
1 changed files with 2 additions and 2 deletions

View File

@ -163,14 +163,14 @@ class Panda(object):
pass
if not enter_bootloader:
self.close()
time.sleep(1.0)
# wait up to 15 seconds
for i in range(0, 15):
try:
self.connect()
break
except Exception:
if i > 0:
print("reconnecting is taking %d seconds..." % i)
print("reconnecting is taking %d seconds..." % (i+1))
if i == 14:
raise Exception("reset failed")
time.sleep(1.0)