jp: don't guess background when stdout is not a tty
This commit is contained in:
parent
7b746a50a8
commit
4c2c9b4f04
1 changed files with 2 additions and 0 deletions
|
|
@ -120,6 +120,8 @@ class Jp(object):
|
|||
return config.getConfig(self.sat_conf, section, name, default=default)
|
||||
|
||||
def guess_background(self):
|
||||
if not sys.stdout.isatty():
|
||||
return 'dark'
|
||||
stdin_fd = sys.stdin.fileno()
|
||||
old_settings = termios.tcgetattr(stdin_fd)
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue