mirror of
https://gitlab.com/ita1024/waf.git
synced 2025-01-03 15:05:18 +01:00
Issue 1511 - emacs pretends it has a tty
This commit is contained in:
parent
1689bc658a
commit
740763c236
@ -11,7 +11,7 @@ console commands.
|
||||
|
||||
"""
|
||||
|
||||
import re, sys
|
||||
import os, re, sys
|
||||
from waflib.Utils import threading
|
||||
|
||||
wlock = threading.Lock()
|
||||
@ -329,7 +329,7 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
if sys.stdout.isatty() or sys.stderr.isatty():
|
||||
if (sys.stdout.isatty() or sys.stderr.isatty()) and os.environ.get('TERM', '') not in ('dumb', 'emacs'):
|
||||
FD = sys.stdout.isatty() and sys.stdout.fileno() or sys.stderr.fileno()
|
||||
def fun():
|
||||
return struct.unpack("HHHH", fcntl.ioctl(FD, termios.TIOCGWINSZ, struct.pack("HHHH", 0, 0, 0, 0)))[1]
|
||||
|
Loading…
Reference in New Issue
Block a user