# HG changeset patch # User Goffi # Date 1602765882 -7200 # Node ID 67e306cae157e9216ffafa8605f0e9b0c7cf47c1 # Parent 297389b1563c739f452f9d7b78993b13df3c3bfe jp: don't guess background when stdout is not a tty diff -r 297389b1563c -r 67e306cae157 sat_frontends/jp/base.py --- a/sat_frontends/jp/base.py Thu Oct 01 10:12:01 2020 +0200 +++ b/sat_frontends/jp/base.py Thu Oct 15 14:44:42 2020 +0200 @@ -120,6 +120,8 @@ 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: