AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
941 stars 335 forks source link

Fix incorrect string operations on bytes output of 'ps' subprocess #1765

Closed parikshittiwari740 closed 3 months ago

parikshittiwari740 commented 4 months ago

The subprocess to get the current shell name would always return a bytes output. The subsequent string operations on that output would always fail with a TypeError.

~Using subprocess.run() along with its text flag will fix the issue at hand as well as bring the code in-line with python's recommendation of using run for all use cases it can handle. The current use case does not warrant a use for subprocess.communicate()~.

Closes #1754

linux-foundation-easycla[bot] commented 4 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.39%. Comparing base (a13f7bb) to head (839d5aa). Report is 27 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1765 +/- ## ========================================== - Coverage 58.41% 58.39% -0.02% ========================================== Files 126 126 Lines 17163 17205 +42 Branches 3506 3519 +13 ========================================== + Hits 10025 10047 +22 - Misses 6473 6491 +18 - Partials 665 667 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.