Skip to content

Commit

Permalink
tools/util: removes text feature from subprocess
Browse files Browse the repository at this point in the history
This feature is removed to make it compatible with older Python
versions.

Signed-off-by: Leandro Belli <[email protected]>
Change-Id: I96ca2d49c318dbdc9c32a7caf3cf1b85af184212
  • Loading branch information
leandro-arm committed Feb 7, 2024
1 parent 6eb0132 commit cdf9701
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ def get_previous_commit() -> str:
an error or if it's the initial commit.
"""
result = subprocess.run(
['git', 'rev-parse', 'HEAD^'],
'git rev-parse HEAD^',
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
stderr=subprocess.PIPE
)
return result.stdout.strip()
return result.stdout.decode('utf-8').strip()


class Results(List[Tuple[str, int]]):
Expand Down

0 comments on commit cdf9701

Please sign in to comment.