mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 09:32:13 +02:00
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] (From OE-Core rev: 66be32c1a075201d6ee0e9b9e10b84e6a2ace745) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
041ac0f9c1
commit
2f4008d694
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user