summaryrefslogtreecommitdiff
path: root/lib/spack/llnl/util/tty/__init__.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-06-27 09:31:21 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2018-07-19 00:41:36 -0700
commit20e4038a726e7b938a6bc5ab196156e0bf0becab (patch)
tree94e49c3db466299239b179fbfb5d421da887aafb /lib/spack/llnl/util/tty/__init__.py
parent1713cb37da6677ccefed6068002dc5c4896edff0 (diff)
downloadspack-20e4038a726e7b938a6bc5ab196156e0bf0becab.tar.gz
spack-20e4038a726e7b938a6bc5ab196156e0bf0becab.tar.bz2
spack-20e4038a726e7b938a6bc5ab196156e0bf0becab.tar.xz
spack-20e4038a726e7b938a6bc5ab196156e0bf0becab.zip
style: make core comply with pep8-naming
Diffstat (limited to 'lib/spack/llnl/util/tty/__init__.py')
-rw-r--r--lib/spack/llnl/util/tty/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/llnl/util/tty/__init__.py b/lib/spack/llnl/util/tty/__init__.py
index d8e5f35379..5bf4e0f8ba 100644
--- a/lib/spack/llnl/util/tty/__init__.py
+++ b/lib/spack/llnl/util/tty/__init__.py
@@ -246,18 +246,18 @@ def hline(label=None, **kwargs):
def terminal_size():
"""Gets the dimensions of the console: (rows, cols)."""
- def ioctl_GWINSZ(fd):
+ def ioctl_gwinsz(fd):
try:
rc = struct.unpack('hh', fcntl.ioctl(
fd, termios.TIOCGWINSZ, '1234'))
except BaseException:
return
return rc
- rc = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
+ rc = ioctl_gwinsz(0) or ioctl_gwinsz(1) or ioctl_gwinsz(2)
if not rc:
try:
fd = os.open(os.ctermid(), os.O_RDONLY)
- rc = ioctl_GWINSZ(fd)
+ rc = ioctl_gwinsz(fd)
os.close(fd)
except BaseException:
pass