Skip to content

Commit

Permalink
Try to work around #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ban3 committed Dec 9, 2015
1 parent 6074cac commit 4081b0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions evic/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from time import sleep

import evic
import usb
import usb.core

DEVICE_NAMES = {b'E052': "eVic-VTC Mini", b'W007': "Presa TC75W"}

Expand Down Expand Up @@ -159,7 +159,10 @@ def main():
dev.set_sys_data()
if dev.fw_version > 0:
print("Restarting the device...\n")
dev.reset_system()
try:
dev.reset_system()
except usb.core.USBError:
pass
sleep(2)
print("Reconnecting the device...\n")
dev.attach()
Expand Down

0 comments on commit 4081b0c

Please sign in to comment.