1539 |
1539 |
1540 @return flag indicating an outdated pip |
1540 @return flag indicating an outdated pip |
1541 @rtype bool |
1541 @rtype bool |
1542 """ |
1542 """ |
1543 try: |
1543 try: |
1544 pipOut = subprocess.run( # secok |
1544 pipOut = ( |
1545 [sys.executable, "-m", "pip", "list", "--outdated", "--format=json"], |
1545 subprocess.run( # secok |
1546 check=True, |
1546 [sys.executable, "-m", "pip", "list", "--outdated", "--format=json"], |
1547 capture_output=True, |
1547 check=True, |
1548 text=True, |
1548 capture_output=True, |
1549 ).stdout.strip().splitlines()[0] |
1549 text=True, |
|
1550 ) |
|
1551 .stdout.strip() |
|
1552 .splitlines()[0] |
|
1553 ) |
1550 # only the first line contains the JSON data |
1554 # only the first line contains the JSON data |
1551 except (OSError, subprocess.CalledProcessError): |
1555 except (OSError, subprocess.CalledProcessError): |
1552 pipOut = "[]" # default empty list |
1556 pipOut = "[]" # default empty list |
1553 try: |
1557 try: |
1554 jsonList = json.loads(pipOut) |
1558 jsonList = json.loads(pipOut) |