From 6daff12f50500472411618d17dde6899cba4ab10 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 16 Feb 2021 21:56:37 +1030 Subject: [PATCH] Fix "is not" literal SyntaxWarning Signed-off-by: Joel Stanley --- liteeth/core/udp.py | 4 ++-- test/model/dumps.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/liteeth/core/udp.py b/liteeth/core/udp.py index b00f26c..bc4d9ec 100644 --- a/liteeth/core/udp.py +++ b/liteeth/core/udp.py @@ -45,7 +45,7 @@ class LiteEthUDPCrossbar(LiteEthCrossbar): # tx tx_stream = user_port.sink - if cd is not "sys": + if cd != "sys": tx_cdc = stream.AsyncFIFO(eth_udp_user_description(user_port.dw), 4) tx_cdc = ClockDomainsRenamer({"write": cd, "read": "sys"})(tx_cdc) self.submodules += tx_cdc @@ -69,7 +69,7 @@ class LiteEthUDPCrossbar(LiteEthCrossbar): self.submodules += rx_converter self.comb += rx_stream.connect(rx_converter.sink) rx_stream = rx_converter.source - if cd is not "sys": + if cd != "sys": rx_cdc = stream.AsyncFIFO(eth_udp_user_description(user_port.dw), 4) rx_cdc = ClockDomainsRenamer({"write": "sys", "read": cd})(rx_cdc) self.submodules += rx_cdc diff --git a/test/model/dumps.py b/test/model/dumps.py index bfcbc03..e9ea8f2 100644 --- a/test/model/dumps.py +++ b/test/model/dumps.py @@ -9,7 +9,7 @@ import re # Helpers ------------------------------------------------------------------------------------------ def format_dump(dump): - return [int(s, 16) for s in re.split(r'[;,\s\n]\s*', dump) if s is not ""] + return [int(s, 16) for s in re.split(r'[;,\s\n]\s*', dump) if s != ""] def verify_packet(packet, infos):