aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/metadata.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-12-19 15:51:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-19 15:04:12 +0000
commit66be32c1a075201d6ee0e9b9e10b84e6a2ace745 (patch)
tree6852016a86790ccc8ce00806b899dc79c65f17c0 /meta/lib/oeqa/utils/metadata.py
parent833f43f71b9a1665c26b6e1874546cb7d37ffd47 (diff)
downloadopenembedded-core-contrib-66be32c1a075201d6ee0e9b9e10b84e6a2ace745.tar.gz
oe-selftest: import git module only when needed
git module is not included into standard Python library and therefore causes import errors on the systems where PythonGit is not installed. As git module only used in the code implementing --repository functionality it's better to import git only in the scope that requires it. [YOCTO #10821] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/metadata.py')
-rw-r--r--meta/lib/oeqa/utils/metadata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
index ecbe763c0f..5d8bf84755 100644
--- a/meta/lib/oeqa/utils/metadata.py
+++ b/meta/lib/oeqa/utils/metadata.py
@@ -5,7 +5,6 @@
# Functions to get metadata from the testing host used
# for analytics of test results.
-from git import Repo, InvalidGitRepositoryError, NoSuchPathError
from collections import OrderedDict
from collections.abc import MutableMapping
from xml.dom.minidom import parseString
@@ -46,6 +45,7 @@ def metadata_from_data_store(d):
def get_layers(layers):
""" Returns layer name, branch, and revision as OrderedDict. """
+ from git import Repo, InvalidGitRepositoryError, NoSuchPathError
layer_dict = OrderedDict()
for layer in layers.split():