Skip to content

Commit

Permalink
Eliminates b'' from the revision strings. (#701)
Browse files Browse the repository at this point in the history
The data parsed from the git output was rteated as a byte array by python.
Doing str() on a byte array gives b'1234567'. By doing decode() on the byte array
we turn it into a string and this liminates the unneeded quotation marks.
  • Loading branch information
balazsracz authored Mar 12, 2023
1 parent 7dbd800 commit b9e888e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

# get the short hash
git_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
git_hash = str(git_hash[:7])
git_hash = str(git_hash[:7].decode())

# get the dirty flag
dirty = os.system('git diff --quiet')
Expand Down

0 comments on commit b9e888e

Please sign in to comment.