[oe-commits] [openembedded-core] branch master updated: metadata.py: return info after fallback methods

git at git.openembedded.org git at git.openembedded.org
Thu Mar 7 13:01:01 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

The following commit(s) were added to refs/heads/master by this push:
     new cd8aedc  metadata.py: return info after fallback methods
cd8aedc is described below

commit cd8aedc408afa4f8589f79e4d85befc7cac76ac6
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Thu Mar 7 16:41:33 2019 +0800

    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 at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/utils/metadata.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
index 70a2756..e0808ae 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):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list