Not all layers are Git repositories, e.g., the workspace layer created
by devtool.

Signed-off-by: Peter Kjellerstedt <[email protected]>
---
 meta/classes/toaster.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 5878230062..f6a6f87de5 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -32,12 +32,12 @@ python toaster_layerinfo_dumpdata() {
     import subprocess
 
     def _get_git_branch(layer_path):
-        branch = subprocess.check_output(['git', 'symbolic-ref', 'HEAD'], 
cwd=layer_path, text=True).strip()
+        branch = subprocess.run(['git', 'symbolic-ref', 'HEAD'], 
cwd=layer_path, text=True, stdout=subprocess.PIPE).stdout.strip()
         branch = branch.replace('refs/heads/', '').rstrip()
         return branch
 
     def _get_git_revision(layer_path):
-        revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], 
cwd=layer_path, text=True).strip()
+        revision = subprocess.run(['git', 'rev-parse', 'HEAD'], 
cwd=layer_path, text=True, stdout=subprocess.PIPE).stdout.strip()
         return revision
 
     def _get_url_map_name(layer_name):
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#239026): 
https://lists.openembedded.org/g/openembedded-core/message/239026
Mute This Topic: https://lists.openembedded.org/mt/119848214/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to