Remove incorrect usages of "is" operator from Python scripts.

Closes #128

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
This commit is contained in:
Chris PeBenito 2019-11-23 10:12:53 -05:00
parent 45bd96f619
commit 0bfd1387ac
2 changed files with 3 additions and 3 deletions

View File

@ -46,10 +46,10 @@ EXCLUDE_LOGINS=["/sbin/nologin", "/bin/false"]
# Python 2/3 wrapper
def getstatusoutput_wrapper(cmd):
if sys.version_info.major is 2:
if sys.version_info.major == 2:
import commands
return commands.getstatusoutput(cmd)
elif sys.version_info.major is 3:
elif sys.version_info.major == 3:
import subprocess
return subprocess.getstatusoutput(cmd)
else:

View File

@ -266,7 +266,7 @@ def format_html_desc(node):
desc_buf = ''
for desc in node.childNodes:
if desc.nodeName == "#text":
if desc.data is not '':
if desc.data:
if desc.parentNode.nodeName != "p":
desc_buf += "<p>" + desc.data + "</p>"
else: