mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Restore old warnings.formatwarning after workaround
See https://github.com/saltstack/salt/pull/17298#issuecomment-62364647
This commit is contained in:
parent
1fd9983fc7
commit
ee306e18b7
@ -1880,12 +1880,14 @@ def warn_until(version,
|
||||
return '{0}:{1}: {2}: {3}'.format(
|
||||
filename, lineno, category.__name__, message
|
||||
)
|
||||
saved = warnings.formatwarning
|
||||
warnings.formatwarning = _formatwarning
|
||||
warnings.warn(
|
||||
message.format(version=version.formatted_version),
|
||||
category,
|
||||
stacklevel=stacklevel
|
||||
)
|
||||
warnings.formatwarning = saved
|
||||
|
||||
|
||||
def kwargs_warn_until(kwargs,
|
||||
|
Loading…
Reference in New Issue
Block a user