From 5fef396321ddc889db89ae93d85fc4ac37c7007e Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 29 Apr 2010 16:49:32 +0200 Subject: [PATCH] [entropy.output] add getcolor() --- libraries/entropy/output.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/entropy/output.py b/libraries/entropy/output.py index 6f8bbf236..81cb8d1bc 100644 --- a/libraries/entropy/output.py +++ b/libraries/entropy/output.py @@ -224,6 +224,12 @@ def nocolor(): global havecolor havecolor=0 +def getcolor(): + """ + Return color status + """ + return havecolor + nc = os.getenv("ETP_NO_COLOR") if nc: nocolor()