Merge pull request #39871 from terminalmage/squelch-import-warning

Squelch warning for pygit2 import
This commit is contained in:
Mike Place 2017-03-07 13:40:17 -07:00 committed by GitHub
commit fcf95f3654

View file

@ -74,7 +74,11 @@ except ImportError:
HAS_GITPYTHON = False
try:
import pygit2
# Squelch warning on cent7 due to them upgrading cffi
import warnings
with warnings.catch_warnings():
warnings.simplefilter('ignore')
import pygit2
HAS_PYGIT2 = True
try:
GitError = pygit2.errors.GitError