Mercurial > libervia-backend
changeset 3378:67e306cae157
jp: don't guess background when stdout is not a tty
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 15 Oct 2020 14:44:42 +0200 |
parents | 297389b1563c |
children | 9081b6c41328 |
files | sat_frontends/jp/base.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: