From ac021379fe1bb2cc7cc1ee02af11d5e38f1a8f8a Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 19 Nov 2021 13:17:27 +0000 Subject: [PATCH] return None if data returned is empty --- src/soc/debug/jtagutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/debug/jtagutils.py b/src/soc/debug/jtagutils.py index a642bd1f..79418e28 100644 --- a/src/soc/debug/jtagutils.py +++ b/src/soc/debug/jtagutils.py @@ -157,7 +157,7 @@ class JTAGServer: def jtagremote_server_recv(self, tdo): data = self.get_data(1, 0) # read 1 byte, non-blocking - if data is None: + if data is None or len(data) == 0: return None # no data read data = bytes.decode(data) if self.debug: -- 2.30.2