From 1f3d49edc6d9d8f82b634d1ade3512cf7c4abd8d Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Mon, 11 Sep 2023 11:50:22 +1200 Subject: [PATCH] =?UTF-8?q?examples:=20Don=E2=80=99t=20use=20deprecated=20?= =?UTF-8?q?method=20=E2=80=98has=5Fkey()=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- examples/logon/ntlogon/ntlogon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/logon/ntlogon/ntlogon.py b/examples/logon/ntlogon/ntlogon.py index 53881684382..3912f0c5ea4 100755 --- a/examples/logon/ntlogon/ntlogon.py +++ b/examples/logon/ntlogon/ntlogon.py @@ -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