summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/utils/metadata.py2
-rwxr-xr-xscripts/oe-selftest2
2 files changed, 2 insertions, 2 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():
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index f4b861f2c3..bfcea66f1c 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -36,7 +36,6 @@ import re
import fnmatch
import collections
import imp
-import git
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
import scriptpath
@@ -577,6 +576,7 @@ def main():
log.info("Finished")
if args.repository:
+ import git
# Commit tests results to repository
metadata = metadata_from_bb()
git_dir = os.path.join(os.getcwd(), 'selftest')