eric7/Utilities/__init__.py

branch
eric7
changeset 8966
c6f67dbc6ee7
parent 8958
ba80dceeb560
child 8975
ae4c3da05550
diff -r 741e81884088 -r c6f67dbc6ee7 eric7/Utilities/__init__.py
--- a/eric7/Utilities/__init__.py	Mon Feb 28 17:10:59 2022 +0100
+++ b/eric7/Utilities/__init__.py	Mon Feb 28 19:44:36 2022 +0100
@@ -1277,11 +1277,11 @@
         # we are on a Linux or macOS platform
         for mountCommand in ["mount", "/sbin/mount", "/usr/sbin/mount"]:
             with contextlib.suppress(FileNotFoundError):
-                mountOutput = (
-                    subprocess.check_output(mountCommand).splitlines()  # secok
-                )
+                mountOutput = subprocess.run(               # secok
+                    mountCommand, check=True, capture_output=True, text=True
+                ).stdout.splitlines()
                 mountedVolumes = [
-                    x.decode("utf-8").split(" type")[0].split(maxsplit=2)[2]
+                    x.split(" type")[0].split(maxsplit=2)[2]
                     for x in mountOutput
                 ]
                 if findAll:

eric ide

mercurial