tests: hide git check warning

This commit is contained in:
Marek Marczykowski-Górecki 2015-06-27 04:19:07 +02:00
parent ee48954445
commit 8b4c9b23b3

View File

@ -55,7 +55,8 @@ except libvirt.libvirtError:
try:
in_git = subprocess.check_output(
['git', 'rev-parse', '--show-toplevel']).strip()
['git', 'rev-parse', '--show-toplevel'],
stderr=open(os.devnull, 'w')).strip()
except subprocess.CalledProcessError:
# git returned nonzero, we are outside git repo
pass