examples: Don’t use deprecated method ‘has_key()’
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Sun, 10 Sep 2023 23:50:22 +0000 (11:50 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 13 Oct 2023 03:50:31 +0000 (03:50 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
examples/logon/ntlogon/ntlogon.py

index 53881684382b07a21f19b17501ec2592787e9f8b..3912f0c5ea470eb801babe42132eaf4eb9a21fb0 100755 (executable)
@@ -187,7 +187,7 @@ def buildScript(buf, sections, group, user, ostype, machine, debug, pause):
                                 print "Error: No substitution text provided line: %d" % idx
                                 sys.exit(1)
 
-                            if macros.has_key(varname):
+                            if varname in macros:
                                 print "Warning: macro %s redefined line: %d" % (varname, idx)
 
                             macros[varname] = varsub