Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Attempt to fix bockbuild wrench output
Browse files Browse the repository at this point in the history
  • Loading branch information
alexischr committed Jul 22, 2015
1 parent be60e26 commit 0bd85fb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions bockbuild/util/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,25 @@ def log (phase, message):
#DISABLED until we can properly refactor/redirect logging
return

#TODO: move these functions to either Profile or their own class
first_summary = True

def logprint (message, color, summary = False):
if sys.stdout.isatty():
print '%s%s%s' % (color, message , bcolors.ENDC)
else:
if summary:
if os.getenv ('BUILD_REVISION') is not None: #MonkeyWrench
print '@MonkeyWrench: AddSummary:%s\\n' % message
if first_summary:
print '@MonkeyWrench: SetSummary:%s\n' % message
first_summary = False
else:
print '@MonkeyWrench: AddSummary:%s\n' % message
else:
print message

def title (message):
logprint ('\n** %s **\n' % message, bcolors.HEADER, summary = True)
def title (message, summary = True):
logprint ('\n** %s **\n' % message, bcolors.HEADER, summary)

def info (message, summary = True):
logprint (message ,bcolors.OKGREEN, summary)
Expand Down

0 comments on commit 0bd85fb

Please sign in to comment.