Corrected another issue related to pip outputting additional data after the JSON line for 'pip list'. eric7

Thu, 21 Jul 2022 14:15:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 21 Jul 2022 14:15:36 +0200
branch
eric7
changeset 9261
66cc5e304450
parent 9260
eb19dcb8d852
child 9262
dd6933d0bdd9

Corrected another issue related to pip outputting additional data after the JSON line for 'pip list'.

scripts/install.py file | annotate | diff | comparison | revisions
--- a/scripts/install.py	Thu Jul 21 14:10:54 2022 +0200
+++ b/scripts/install.py	Thu Jul 21 14:15:36 2022 +0200
@@ -1546,7 +1546,8 @@
             check=True,
             capture_output=True,
             text=True,
-        ).stdout
+        ).stdout.strip().splitlines()[0]
+        # only the first line contains the JSON data
     except (OSError, subprocess.CalledProcessError):
         pipOut = "[]"  # default empty list
     try:

eric ide

mercurial