[PATCH] util: rename argument of isatty()
Augie Fackler
raf at durin42.com
Tue Dec 15 12:15:37 CST 2015
On Sun, Dec 13, 2015 at 11:50:32PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1450000115 -32400
> # Sun Dec 13 18:48:35 2015 +0900
> # Node ID 21c726c0b045b7f4b871446e6445a2a586fd3992
> # Parent d43f8d4b12a79e66b1350c3669f599a9a45b2ee8
> util: rename argument of isatty()
Sensible. Queued.
>
> In general, "fd" is a file descriptor, but isatty() expects a file object.
> We should call it "fp" or "fh".
>
> diff --git a/mercurial/util.py b/mercurial/util.py
> --- a/mercurial/util.py
> +++ b/mercurial/util.py
> @@ -2293,9 +2293,9 @@ def removeauth(u):
> u.user = u.passwd = None
> return str(u)
>
> -def isatty(fd):
> +def isatty(fp):
> try:
> - return fd.isatty()
> + return fp.isatty()
> except AttributeError:
> return False
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list