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
|
||||
|
||||
out = out.decode("UTF-8").replace("\n", " ")
|
||||
|
||||
if out[-1] == " ":
|
||||
out = out[:-1]
|
||||
try:
|
||||
if out[-1] == " ":
|
||||
out = out[:-1]
|
||||
except:
|
||||
out = ""
|
||||
|
||||
self.output = {
|
||||
"full_text": out,
|
||||
|
Loading…
Reference in New Issue
Block a user