ipapython/ipachangeconf.py: change "is not 0" for "!= 0"

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 <fcami@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
François Cami 2019-09-02 10:58:35 +02:00 committed by Florence Blanc-Renaud
parent 51836c0594
commit 02262ac7cf

View File

@ -482,7 +482,7 @@ class IPAChangeConf:
error=e, fname=f.name, line=line.rstrip())) error=e, fname=f.name, line=line.rstrip()))
# Add last section if any # Add last section if any
if len(sectopts) is not 0: if len(sectopts) != 0:
opts.append({'name': section, opts.append({'name': section,
'type': 'section', 'type': 'section',
'value': sectopts}) 'value': sectopts})