mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-04-13 22:47:12 +03:00
Issue #25, disable colors on non-tty
This commit is contained in:
parent
1d9c25d3b4
commit
14ac525525
@ -18,12 +18,13 @@ import argparse
|
|||||||
from pprint import pprint as p
|
from pprint import pprint as p
|
||||||
import select
|
import select
|
||||||
|
|
||||||
|
use_color=False
|
||||||
try:
|
if sys.stdout.isatty():
|
||||||
import colorama
|
try:
|
||||||
use_color=True
|
import colorama
|
||||||
except ImportError:
|
use_color=True
|
||||||
use_color=False
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
VERSION="3.0-rc5"
|
VERSION="3.0-rc5"
|
||||||
HEADER="zfs-autobackup v{} - Copyright 2020 E.H.Eefting (edwin@datux.nl)\n".format(VERSION)
|
HEADER="zfs-autobackup v{} - Copyright 2020 E.H.Eefting (edwin@datux.nl)\n".format(VERSION)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user