Skip to content

Commit 2ccfa57

Browse files
authored
Merge branch 'adafruit:main' into deinit-i2cdisplay-reset-on-raise
2 parents fb6e0f0 + e3b924b commit 2ccfa57

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/build_board_info.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import sys
1111
import sh
1212
import base64
13+
from io import StringIO
1314
from datetime import date
1415
from sh.contrib import git
1516

@@ -58,9 +59,13 @@ def get_languages(list_all=False):
5859

5960
def get_version_info():
6061
version = None
61-
sha = git("rev-parse", "--short", "HEAD").stdout.decode("utf-8")
62+
buffer = StringIO()
63+
git("rev-parse", "--short", "HEAD", _out=buffer)
64+
sha = buffer.getvalue().strip()
6265
try:
63-
version = git("describe", "--tags", "--exact-match").stdout.decode("utf-8").strip()
66+
buffer = StringIO()
67+
git("describe", "--tags", "--exact-match", _out=buffer)
68+
version = buffer.getvalue().strip()
6469
except sh.ErrorReturnCode_128:
6570
# No exact match
6671
pass

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy