util.report without mandatory arguments

reporting can now omit either "who" or "what". cleaner output in case of no "who"...
This commit is contained in:
Philip Eisenlohr 2016-07-18 10:20:39 -04:00
parent 3305cae220
commit bb5070b52f
1 changed files with 3 additions and 2 deletions

View File

@ -49,9 +49,10 @@ def croak(what, newline = True):
sys.stderr.flush()
# -----------------------------
def report(who,what):
def report(who = None,
what = None):
"""reports script and file name"""
croak( (emph(who) if who else '') + (': '+what if what else '') )
croak( (emph(who)+': ' if who else '') + (what if what else '') )
# -----------------------------