]> granicus.if.org Git - python/commitdiff
Deprecate commands.getstatus().
authorGeorg Brandl <georg@python.org>
Tue, 13 Mar 2007 21:32:01 +0000 (21:32 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 13 Mar 2007 21:32:01 +0000 (21:32 +0000)
Doc/lib/libcommands.tex
Lib/commands.py

index 53b8a2070755fe3ea44eec4acaec08bf7aac3072..fa9b464f86220e0c832a450ca9a35169deced3bd 100644 (file)
@@ -39,6 +39,10 @@ and the return value is a string containing the command's output.
 Return the output of \samp{ls -ld \var{file}} as a string.  This
 function uses the \function{getoutput()} function, and properly
 escapes backslashes and dollar signs in the argument.
+
+\deprecated{2.6}{This function is nonobvious and useless,
+                 also the name is misleading in the presence of
+                \function{getstatusoutput()}.}
 \end{funcdesc}
 
 Example:
index cfbb541cfd61ac27993b7755f3e2126d81b136b7..d19aa1a480ac3374cbc333f132c60fcca8043b61 100644 (file)
@@ -32,6 +32,8 @@ __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)
     return getoutput('ls -ld' + mkarg(file))