From b5502fb52ae11f5fc5d42ad63fdce424349dac08 Mon Sep 17 00:00:00 2001 From: Christian Burmeister Date: Tue, 12 May 2020 18:26:03 +0200 Subject: [PATCH] netfilter - Python 3.8 - SyntaxWarning for 'is not' (#3537) --- data/Dockerfiles/netfilter/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/netfilter/server.py b/data/Dockerfiles/netfilter/server.py index 77ed4864..90a055be 100644 --- a/data/Dockerfiles/netfilter/server.py +++ b/data/Dockerfiles/netfilter/server.py @@ -496,7 +496,7 @@ if __name__ == '__main__': watch_thread.daemon = True watch_thread.start() - if os.getenv('SNAT_TO_SOURCE') and os.getenv('SNAT_TO_SOURCE') is not 'n': + if os.getenv('SNAT_TO_SOURCE') and os.getenv('SNAT_TO_SOURCE') != 'n': try: snat_ip = os.getenv('SNAT_TO_SOURCE') snat_ipo = ipaddress.ip_address(snat_ip) @@ -507,7 +507,7 @@ if __name__ == '__main__': except ValueError: print(os.getenv('SNAT_TO_SOURCE') + ' is not a valid IPv4 address') - if os.getenv('SNAT6_TO_SOURCE') and os.getenv('SNAT6_TO_SOURCE') is not 'n': + if os.getenv('SNAT6_TO_SOURCE') and os.getenv('SNAT6_TO_SOURCE') != 'n': try: snat_ip = os.getenv('SNAT6_TO_SOURCE') snat_ipo = ipaddress.ip_address(snat_ip)