From: Luke Kenneth Casson Leighton Date: Fri, 19 Nov 2021 13:17:27 +0000 (+0000) Subject: return None if data returned is empty X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ac021379fe1bb2cc7cc1ee02af11d5e38f1a8f8a;p=soc.git return None if data returned is empty --- 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: