Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add support for NO_COLOR
- Loading branch information
Showing
with
5 additions
and
5 deletions.
-
+4
−4
kitten/__init__.py
-
+1
−1
setup.py
|
@@ -14,7 +14,7 @@ |
|
|
import fabric |
|
|
from six.moves import range, queue |
|
|
|
|
|
__version__ = "0.2.13" |
|
|
__version__ = "0.2.14" |
|
|
|
|
|
CHUNK_SIZE = 100 |
|
|
DEFAULT = {"threads": 10, "timeout": 10} |
|
@@ -50,9 +50,9 @@ def ansi(x): |
|
|
|
|
|
|
|
|
def colored(s, code=0, bold=False): |
|
|
if sys.stdout.isatty(): |
|
|
return "{}{}{}{}".format(ansi(code), ansi(1) if bold else "", s, ansi(0)) |
|
|
return s |
|
|
if not sys.stdout.isatty() or "NO_COLOR" in os.environ: |
|
|
return s |
|
|
return "{}{}{}{}".format(ansi(code), ansi(1) if bold else "", s, ansi(0)) |
|
|
|
|
|
|
|
|
def red(s): |
|
|
|
@@ -5,7 +5,7 @@ |
|
|
|
|
|
setuptools.setup( |
|
|
name="kitten", |
|
|
version="0.2.13", |
|
|
version="0.2.14", |
|
|
author="Chris Rehn", |
|
|
author_email="chris@rehn.me", |
|
|
description="Tiny multi-server automation tool.", |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.