[oe-commits] [openembedded-core] 26/50: oeqa.utils.git: support git commands with updated env
git at git.openembedded.org
git at git.openembedded.org
Thu Aug 25 22:04:42 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 9b3c7c47f5d0fa473fe1db81b59b26531414781c
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Fri May 13 16:34:04 2016 +0300
oeqa.utils.git: support git commands with updated env
Extend GitRepo.run_cmd so that the caller may redefine and/or define
additional environment variables that will be used when the git command
is run.
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oeqa/utils/git.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index a4c6741..6a2987f 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -30,9 +30,13 @@ class GitRepo(object):
cmd_str, ret.status, ret.output))
return ret.output.strip()
- def run_cmd(self, git_args):
+ def run_cmd(self, git_args, env_update=None):
"""Run Git command"""
- return self._run_git_cmd_at(git_args, self.top_dir)
+ env = None
+ if env_update:
+ env = os.environ.copy()
+ env.update(env_update)
+ return self._run_git_cmd_at(git_args, self.top_dir, env=env)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list