Issue #25, disable colors on non-tty

This commit is contained in:
Marius van Witzenburg 2020-03-08 23:55:07 +01:00
parent 1d9c25d3b4
commit 14ac525525
No known key found for this signature in database
GPG Key ID: 554DA2C4D1D47FC5

View File

@ -18,12 +18,13 @@ import argparse
from pprint import pprint as p
import select
try:
import colorama
use_color=True
except ImportError:
use_color=False
use_color=False
if sys.stdout.isatty():
try:
import colorama
use_color=True
except ImportError:
pass
VERSION="3.0-rc5"
HEADER="zfs-autobackup v{} - Copyright 2020 E.H.Eefting (edwin@datux.nl)\n".format(VERSION)