Update python code for python 3.8 or higher compatibility
Changes:
- Update shebang directive to use python3 explicitly.
- remove preexec_fn feature which is deprecated in higher
python version 3.8 and above.
- bufsize fix, from documentation bufsize 1 means line buffered
(only usable if universal_newlines=True i.e., in a text mode)
refer: https://docs.python.org/3/library/subprocess.html
- Fix SyntaxWarning: "is" with "=="
Change-Id: Ib96c1ba8c2327d6774d0d731b48ca7e61a4a297a
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ffdc/collect_ffdc.py b/ffdc/collect_ffdc.py
index 78791e5..7711fd6 100644
--- a/ffdc/collect_ffdc.py
+++ b/ffdc/collect_ffdc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
r"""
CLI FFDC Collector.
diff --git a/ffdc/ffdc_collector.py b/ffdc/ffdc_collector.py
index c91503a..4a8cfa4 100644
--- a/ffdc/ffdc_collector.py
+++ b/ffdc/ffdc_collector.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
r"""
See class prolog below for details.
diff --git a/ffdc/lib/ssh_utility.py b/ffdc/lib/ssh_utility.py
index 32fef63b..e695f3d 100644
--- a/ffdc/lib/ssh_utility.py
+++ b/ffdc/lib/ssh_utility.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import paramiko
from paramiko.ssh_exception import AuthenticationException
diff --git a/ffdc/lib/telnet_utility.py b/ffdc/lib/telnet_utility.py
index 81668d6..08e4071 100644
--- a/ffdc/lib/telnet_utility.py
+++ b/ffdc/lib/telnet_utility.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import time
diff --git a/ffdc/plugins/date_time_utils.py b/ffdc/plugins/date_time_utils.py
index 8bc46d4..65bcb88 100644
--- a/ffdc/plugins/date_time_utils.py
+++ b/ffdc/plugins/date_time_utils.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
r"""
This module contains functions having to do with date time filter.
diff --git a/ffdc/plugins/redfish.py b/ffdc/plugins/redfish.py
index 8815555..33a0669 100644
--- a/ffdc/plugins/redfish.py
+++ b/ffdc/plugins/redfish.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
r"""
This module contains functions having to do with redfish path walking.
diff --git a/ffdc/plugins/scp_execution.py b/ffdc/plugins/scp_execution.py
index 859925f..0aca54c 100644
--- a/ffdc/plugins/scp_execution.py
+++ b/ffdc/plugins/scp_execution.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
diff --git a/ffdc/plugins/ssh_execution.py b/ffdc/plugins/ssh_execution.py
index 0be7c19..087d887 100644
--- a/ffdc/plugins/ssh_execution.py
+++ b/ffdc/plugins/ssh_execution.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
diff --git a/ffdc/plugins/telnet_execution.py b/ffdc/plugins/telnet_execution.py
index 7ae23c1..7cfd78b 100644
--- a/ffdc/plugins/telnet_execution.py
+++ b/ffdc/plugins/telnet_execution.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os