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

Thu, 21 Jul 2022 14:10:54 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 21 Jul 2022 14:10:54 +0200
branch
eric7
changeset 9260
eb19dcb8d852
parent 9259
66167d4d0407
child 9261
66cc5e304450

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

src/eric7/PipInterface/Pip.py file | annotate | diff | comparison | revisions
--- a/src/eric7/PipInterface/Pip.py	Wed Jul 20 17:52:51 2022 +0200
+++ b/src/eric7/PipInterface/Pip.py	Thu Jul 21 14:10:54 2022 +0200
@@ -640,7 +640,7 @@
                         proc.readAllStandardOutput(),
                         Preferences.getSystem("IOEncoding"),
                         "replace",
-                    ).strip()
+                    ).strip().splitlines()[0]
                     try:
                         jsonList = json.loads(output)
                     except Exception:
@@ -707,7 +707,7 @@
                         proc.readAllStandardOutput(),
                         Preferences.getSystem("IOEncoding"),
                         "replace",
-                    ).strip()
+                    ).strip().splitlines()[0]
                     try:
                         jsonList = json.loads(output)
                     except Exception:

eric ide

mercurial