avocado/core/job.py: don't attempt to run git if .git doesn't exist
When looking for the GIT commit info to log in the Avocado job log,
we can optmize things a little by not running git if the ".git" directory
doesn't exist at the top level.
py2to3 is not being used anymore, so we don't need to check if we're
running from modules from the build directory.
Also, as another optmization, let's not look for the git binary until
we're sure we'll be running it.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
Showing
想要评论请 注册 或 登录