mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
#4351: more appropriate DeprecationWarning stacklevels
This commit is contained in:
parent
6f9977852f
commit
d846f1d4c2
9 changed files with 22 additions and 16 deletions
|
@ -37,7 +37,7 @@ __all__ = ["getstatusoutput","getoutput","getstatus"]
|
|||
def getstatus(file):
|
||||
"""Return output of "ls -ld <file>" in a string."""
|
||||
import warnings
|
||||
warnings.warn("commands.getstatus() is deprecated", DeprecationWarning)
|
||||
warnings.warn("commands.getstatus() is deprecated", DeprecationWarning, 2)
|
||||
return getoutput('ls -ld' + mkarg(file))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue