]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Fix string compare in DnsHandler() of dns_hub.py
authorAndreas Schneider <asn@samba.org>
Fri, 13 Mar 2020 14:15:53 +0000 (15:15 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Mar 2020 14:31:25 +0000 (14:31 +0000)
dns_hub.py:115: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if forwarder is 'ignore':
dns_hub.py:117: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif forwarder is 'fail':

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Mar 24 14:31:25 UTC 2020 on sn-devel-184

selftest/target/dns_hub.py

index 9360f9136fce30a27c92c4343960a8f5a2de34d4..dcf59dcd701d0f115549ddd61353bd022fecd435 100755 (executable)
@@ -112,9 +112,9 @@ class DnsHandler(sserver.BaseRequestHandler):
         forwarder = self.forwarder(name)
         response = None
 
-        if forwarder is 'ignore':
+        if forwarder == 'ignore':
             return
-        elif forwarder is 'fail':
+        elif forwarder == 'fail':
             pass
         elif forwarder in ['torture', None]:
             response = query