Add exception handling for output
This commit is contained in:
parent
48446a9ad7
commit
2141e4fd2b
@ -26,9 +26,11 @@ class Shell(IntervalModule):
|
|||||||
color = self.error_color
|
color = self.error_color
|
||||||
|
|
||||||
out = out.decode("UTF-8").replace("\n", " ")
|
out = out.decode("UTF-8").replace("\n", " ")
|
||||||
|
try:
|
||||||
if out[-1] == " ":
|
if out[-1] == " ":
|
||||||
out = out[:-1]
|
out = out[:-1]
|
||||||
|
except:
|
||||||
|
out = ""
|
||||||
|
|
||||||
self.output = {
|
self.output = {
|
||||||
"full_text": out,
|
"full_text": out,
|
||||||
|
Loading…
Reference in New Issue
Block a user