Default tput cols to 80.

This commit is contained in:
Anthony Sottile 2014-07-17 16:47:57 -07:00
parent 720db97c13
commit 7c49c9f7d9

View file

@ -7,7 +7,11 @@ from pre_commit import color
# TODO: smell: import side-effects
COLS = int(
subprocess.Popen(['tput', 'cols'], stdout=subprocess.PIPE).communicate()[0]
subprocess.Popen(
['tput', 'cols'], stdout=subprocess.PIPE
).communicate()[0] or
# Default in the case of no terminal
80
)