From 02262ac7cfa52926fd0c943ddf6e96269e90e218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= Date: Mon, 2 Sep 2019 10:58:35 +0200 Subject: [PATCH] ipapython/ipachangeconf.py: change "is not 0" for "!= 0" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python 3.8 introduced a warning to check for usage of "is not" when comparing literals. Any such usage will output: SyntaxWarning: "is not" with a literal. Did you mean "!="? See: https://bugs.python.org/issue34850 Fixes: https://pagure.io/freeipa/issue/8057 Signed-off-by: François Cami Reviewed-By: Florence Blanc-Renaud --- ipapython/ipachangeconf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipapython/ipachangeconf.py b/ipapython/ipachangeconf.py index cfb4a6e6c..57dbb6521 100644 --- a/ipapython/ipachangeconf.py +++ b/ipapython/ipachangeconf.py @@ -482,7 +482,7 @@ class IPAChangeConf: error=e, fname=f.name, line=line.rstrip())) # Add last section if any - if len(sectopts) is not 0: + if len(sectopts) != 0: opts.append({'name': section, 'type': 'section', 'value': sectopts})