mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
metadata.py: return info after fallback methods
If python3 git module is not installed, we fall back to some git command to get info. A previous commit (b8d22ed6) accidently deleted the return statement, causing errors like below. Exception: UnboundLocalError: local variable 'InvalidGitRepositoryError' referenced before assignment (From OE-Core rev: cd8aedc408afa4f8589f79e4d85befc7cac76ac6) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -76,6 +76,7 @@ def git_rev_info(path):
|
||||
info['commit_count'] = int(subprocess.check_output(["git", "rev-list", "--count", "HEAD"], cwd=path).decode('utf-8').strip())
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
return info
|
||||
try:
|
||||
repo = Repo(path, search_parent_directories=True)
|
||||
except (InvalidGitRepositoryError, NoSuchPathError):
|
||||
|
||||
Reference in New Issue
Block a user