Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
8efe95c4
Commit
8efe95c4
authored
Apr 01, 2013
by
Christos Stavrakakis
Browse files
Do not print colors if stdout is not tty
Refs #3520
parent
8c2716c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
devflow/autopkg.py
View file @
8efe95c4
...
...
@@ -43,9 +43,18 @@ from devflow import versioning
from
devflow
import
utils
from
devflow
import
BRANCH_TYPES
try
:
from
colors
import
red
,
green
except
ImportError
:
if
sys
.
stdout
.
isatty
():
try
:
import
colors
use_colors
=
True
except
AttributeError
:
use_colors
=
False
if
use_colors
:
red
=
colors
.
red
green
=
colors
.
green
else
:
red
=
lambda
x
:
x
green
=
lambda
x
:
x
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment