1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

examples: Don’t use deprecated method ‘has_key()’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-09-11 11:50:22 +12:00 committed by Andrew Bartlett
parent 2870ef951e
commit 1f3d49edc6

View File

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