Truncate 'what' field in w output

This commit is contained in:
Oleksii Shevchuk 2017-03-16 21:40:53 +02:00
parent 8f64c765e0
commit 8ff4031047
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class WModule(PupyModule):
object.update({ object.update({
'IDLE': colorize(str(timedelta(seconds=session['idle'])), color), 'IDLE': colorize(str(timedelta(seconds=session['idle'])), color),
'PID': colorize(str(session.get('pid', '')), color), 'PID': colorize(str(session.get('pid', '')), color),
'WHAT': colorize(what, color) 'WHAT': colorize(what[:30]+'' if len(what) > 30 else what, color)
}) })
tablein.append(object) tablein.append(object)