mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
read file as byte and no tab before sleep
This commit is contained in:
@@ -7,7 +7,7 @@ from Crypto.PublicKey import RSA
|
|||||||
|
|
||||||
rsa = RSA.importKey(open(sys.argv[3]).read())
|
rsa = RSA.importKey(open(sys.argv[3]).read())
|
||||||
|
|
||||||
with open(sys.argv[1]) as f:
|
with open(sys.argv[1], "rb") as f:
|
||||||
dat = f.read()
|
dat = f.read()
|
||||||
|
|
||||||
print("signing", len(dat), "bytes")
|
print("signing", len(dat), "bytes")
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ class Panda(object):
|
|||||||
break
|
break
|
||||||
except (usb1.USBErrorIO, usb1.USBErrorOverflow):
|
except (usb1.USBErrorIO, usb1.USBErrorOverflow):
|
||||||
print("CAN: BAD RECV, RETRYING")
|
print("CAN: BAD RECV, RETRYING")
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
return parse_can_buffer(dat)
|
return parse_can_buffer(dat)
|
||||||
|
|
||||||
def can_clear(self, bus):
|
def can_clear(self, bus):
|
||||||
|
|||||||
Reference in New Issue
Block a user