strip newlines from today output before displaying in status bar

This commit is contained in:
Alan Hamlett 2021-10-30 15:18:26 -07:00
parent cebcfaa0e9
commit 7db5fe0a5d

View File

@ -336,6 +336,8 @@ class FetchStatusBarCodingTime(threading.Thread):
process = Popen(cmd, stdout=PIPE, stderr=STDOUT) process = Popen(cmd, stdout=PIPE, stderr=STDOUT)
output, err = process.communicate() output, err = process.communicate()
output = u(output) output = u(output)
if output:
output = output.strip()
retcode = process.poll() retcode = process.poll()
if not retcode and output: if not retcode and output:
msg = 'Today: {output}'.format(output=output) msg = 'Today: {output}'.format(output=output)