Merge pull request #538 from archlinux/torxed-fix-536
Attempt to fix issue regarding broken output
This commit is contained in:
commit
dc10725bf9
|
|
@ -202,27 +202,6 @@ class SysCommandWorker:
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
output = output.strip('\r\n ')
|
|
||||||
if len(output) <= 0:
|
|
||||||
return False
|
|
||||||
|
|
||||||
from .user_interaction import get_terminal_width
|
|
||||||
|
|
||||||
# Move back to the beginning of the terminal
|
|
||||||
sys.stdout.flush()
|
|
||||||
sys.stdout.write("\033[%dG" % 0)
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
# Clear the line
|
|
||||||
sys.stdout.write(" " * get_terminal_width())
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
# Move back to the beginning again
|
|
||||||
sys.stdout.flush()
|
|
||||||
sys.stdout.write("\033[%dG" % 0)
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
# And print the new output we're peaking on:
|
|
||||||
sys.stdout.write(output)
|
sys.stdout.write(output)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue