From 66be32c1a075201d6ee0e9b9e10b84e6a2ace745 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 19 Dec 2016 15:51:43 +0200 Subject: 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 Signed-off-by: Richard Purdie --- scripts/oe-selftest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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') -- cgit 1.2.3-korg