From fe727706bd422c4b57a72f09d3024fbcfc46ff71 Mon Sep 17 00:00:00 2001 From: Riccardo Date: Wed, 25 Sep 2019 14:34:28 -0700 Subject: [PATCH] read file as byte and no tab before sleep --- crypto/sign.py | 2 +- python/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/sign.py b/crypto/sign.py index b5000cfa..b0093e9b 100755 --- a/crypto/sign.py +++ b/crypto/sign.py @@ -7,7 +7,7 @@ from Crypto.PublicKey import RSA 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() print("signing", len(dat), "bytes") diff --git a/python/__init__.py b/python/__init__.py index 18e57e8d..3f47ff8d 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -479,7 +479,7 @@ class Panda(object): break except (usb1.USBErrorIO, usb1.USBErrorOverflow): print("CAN: BAD RECV, RETRYING") - time.sleep(0.1) + time.sleep(0.1) return parse_can_buffer(dat) def can_clear(self, bus):