diff options
Diffstat (limited to 'meta/classes/metadata_scm.bbclass')
-rw-r--r-- | meta/classes/metadata_scm.bbclass | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass index 64465faa4c..0f7f4235a3 100644 --- a/meta/classes/metadata_scm.bbclass +++ b/meta/classes/metadata_scm.bbclass @@ -65,19 +65,19 @@ def base_get_metadata_svn_revision(path, d): return revision def base_get_metadata_git_branch(path, d): - import subprocess + import bb.process try: - return subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"], - cwd=path).strip() - except: - return "<unknown>" + rev, _ = bb.process.run('git rev-parse --abbrev-ref HEAD', cwd=path) + except bb.process.ExecutionError: + rev = '<unknown>' + return rev.strip() def base_get_metadata_git_revision(path, d): - import subprocess + import bb.process try: - return subprocess.check_output(["git", "rev-parse", "HEAD"], - cwd=path).strip() - except: - return "<unknown>" + rev, _ = bb.process.run('git rev-parse HEAD', cwd=path) + except bb.process.ExecutionError: + rev = '<unknown>' + return rev.strip() |