mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #39871 from terminalmage/squelch-import-warning
Squelch warning for pygit2 import
This commit is contained in:
commit
fcf95f3654
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue