summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2019-03-07 16:41:33 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-07 12:59:22 +0000
commitcd8aedc408afa4f8589f79e4d85befc7cac76ac6 (patch)
treeec963ec4c311ef2131bd2ad8b94d075b53024743
parent124c6bf5a0a5cc20d2ebbf04dc7b577cb4f5153a (diff)
downloadopenembedded-core-contrib-cd8aedc408afa4f8589f79e4d85befc7cac76ac6.tar.gz
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 Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/metadata.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
index 70a27569f2..e0808ae0ac 100644
--- a/meta/lib/oeqa/utils/metadata.py
+++ b/meta/lib/oeqa/utils/metadata.py
@@ -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):