diff options
author | Damian Szuberski <[email protected]> | 2022-01-13 17:51:12 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-13 09:51:12 -0700 |
commit | 8a7c4efd3cf47ce4a27b00c176845f1ac1c483c8 (patch) | |
tree | 54891144d7500f1e9656e09b4ba5df0e763e9c8f /cmd/arc_summary/arc_summary3 | |
parent | da9c6c033388c19cf3a2b4c5a9ab4287cb831c9c (diff) |
Removed Python 2 and Python 3.5- support
Deprecation of Python versions below 3.6 gives opportunity to unify the
build and install requirements for OpenZFS packages. The minimal
supported Python version is 3.6 as this is the most recent Python
package CentOS/RHEL 7 users can get.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Rich Ercolani <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: szubersk <[email protected]>
Closes #12925
Diffstat (limited to 'cmd/arc_summary/arc_summary3')
-rwxr-xr-x | cmd/arc_summary/arc_summary3 | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/cmd/arc_summary/arc_summary3 b/cmd/arc_summary/arc_summary3 index 7b28012ed..4f275813d 100755 --- a/cmd/arc_summary/arc_summary3 +++ b/cmd/arc_summary/arc_summary3 @@ -191,21 +191,13 @@ elif sys.platform.startswith('linux'): # there, so we fall back on modinfo command = ["/sbin/modinfo", request, "-0"] - # The recommended way to do this is with subprocess.run(). However, - # some installed versions of Python are < 3.5, so we offer them - # the option of doing it the old way (for now) info = '' try: - if 'run' in dir(subprocess): - info = subprocess.run(command, stdout=subprocess.PIPE, - universal_newlines=True) - raw_output = info.stdout.split('\0') - else: - info = subprocess.check_output(command, - universal_newlines=True) - raw_output = info.split('\0') + info = subprocess.run(command, stdout=subprocess.PIPE, + check=True, universal_newlines=True) + raw_output = info.stdout.split('\0') except subprocess.CalledProcessError: print("Error: Descriptions not available", |