mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Filterwarning overide previously defined filters ISSUE:57582
This commit is contained in:
parent
bc566c117d
commit
24d503ab97
3 changed files with 9 additions and 0 deletions
|
@ -38,6 +38,7 @@ warnings.filterwarnings(
|
|||
"", # No deprecation message match
|
||||
DeprecationWarning, # This filter is for DeprecationWarnings
|
||||
r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>'
|
||||
append=True,
|
||||
)
|
||||
|
||||
# While we are supporting Python2.6, hide nested with-statements warnings
|
||||
|
@ -45,6 +46,7 @@ warnings.filterwarnings(
|
|||
"ignore",
|
||||
"With-statements now directly support multiple context managers",
|
||||
DeprecationWarning,
|
||||
append=True,
|
||||
)
|
||||
|
||||
# Filter the backports package UserWarning about being re-imported
|
||||
|
@ -52,6 +54,7 @@ warnings.filterwarnings(
|
|||
"ignore",
|
||||
"^Module backports was already imported from (.*), but (.*) is being added to sys.path$",
|
||||
UserWarning,
|
||||
append=True,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ warnings.filterwarnings(
|
|||
"", # No deprecation message matchHAS_PSUTIL
|
||||
DeprecationWarning, # This filter is for DeprecationWarnings
|
||||
r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>'
|
||||
append=True,
|
||||
)
|
||||
|
||||
# While we are supporting Python2.6, hide nested with-statements warnings
|
||||
|
@ -35,6 +36,7 @@ warnings.filterwarnings(
|
|||
"ignore",
|
||||
"With-statements now directly support multiple context managers",
|
||||
DeprecationWarning,
|
||||
append=True,
|
||||
)
|
||||
|
||||
# Filter the backports package UserWarning about being re-imported
|
||||
|
@ -42,6 +44,7 @@ warnings.filterwarnings(
|
|||
"ignore",
|
||||
"^Module backports was already imported from (.*), but (.*) is being added to sys.path$",
|
||||
UserWarning,
|
||||
append=True,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ warnings.filterwarnings(
|
|||
"", # No deprecation message match
|
||||
DeprecationWarning, # This filter is for DeprecationWarnings
|
||||
r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>'
|
||||
append=True,
|
||||
)
|
||||
|
||||
# While we are supporting Python2.6, hide nested with-statements warnings
|
||||
|
@ -21,6 +22,7 @@ warnings.filterwarnings(
|
|||
"ignore",
|
||||
"With-statements now directly support multiple context managers",
|
||||
DeprecationWarning,
|
||||
append=True,
|
||||
)
|
||||
|
||||
# Filter the backports package UserWarning about being re-imported
|
||||
|
@ -28,6 +30,7 @@ warnings.filterwarnings(
|
|||
"ignore",
|
||||
"^Module backports was already imported from (.*), but (.*) is being added to sys.path$",
|
||||
UserWarning,
|
||||
append=True,
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue