strip the output

This commit is contained in:
sasasa10 2021-05-01 12:59:57 +08:00 committed by GitHub
parent fb303e048f
commit 43ccca3b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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