aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <pebenito@ieee.org>2019-11-23 10:12:53 -0500
committerJason Zaman <perfinion@gentoo.org>2019-12-16 21:13:11 +0800
commitae2697a78299ab76d5efa932eb4e13ce6874965d (patch)
treefb410f338d292383ccd5d047d8b3eba6cfb025cf /support
parentvarious: Module version bump. (diff)
downloadhardened-refpolicy-ae2697a78299ab76d5efa932eb4e13ce6874965d.tar.gz
hardened-refpolicy-ae2697a78299ab76d5efa932eb4e13ce6874965d.tar.bz2
hardened-refpolicy-ae2697a78299ab76d5efa932eb4e13ce6874965d.zip
Remove incorrect usages of "is" operator from Python scripts.
Closes #128 Signed-off-by: Chris PeBenito <pebenito@ieee.org> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'support')
-rw-r--r--support/genhomedircon.py4
-rw-r--r--support/sedoctool.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/support/genhomedircon.py b/support/genhomedircon.py
index 3503fb4a..a565af2a 100644
--- a/support/genhomedircon.py
+++ b/support/genhomedircon.py
@@ -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:
diff --git a/support/sedoctool.py b/support/sedoctool.py
index de848631..3fddc39a 100644
--- a/support/sedoctool.py
+++ b/support/sedoctool.py
@@ -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: