Skip to content

Commit

Permalink
pyDKB/misc: fix error with module name log prefix in interactive mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgolosova committed Aug 6, 2019
1 parent 8c7e551 commit ff7b18f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Utils/Dataflow/pyDKB/common/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def log(message, level=logLevel.INFO, *args):
else:
frm = inspect.stack()[1]
mod = inspect.getmodule(frm[0])
prefix = ' (%s)' % mod.__name__
modname = getattr(mod, '__name__', 'main')
prefix = ' (%s)' % modname
if lines:
dtime = datetime.now().strftime(DTFORMAT)
out_message = "%s (%s)%s %s" % (dtime, logLevel.memberName(level),
Expand Down

0 comments on commit ff7b18f

Please sign in to comment.