commit
1f48d2d53c
@ -13,11 +13,11 @@ class Shell(IntervalModule):
|
|||||||
|
|
||||||
color = "#FFFFFF"
|
color = "#FFFFFF"
|
||||||
error_color = "#FF0000"
|
error_color = "#FF0000"
|
||||||
ignore_emtpy_stdout = False
|
ignore_empty_stdout = False
|
||||||
|
|
||||||
settings = (
|
settings = (
|
||||||
("command", "command to be executed"),
|
("command", "command to be executed"),
|
||||||
("ignore_emtpy_stdout", "Let the block be empty"),
|
("ignore_empty_stdout", "Let the block be empty"),
|
||||||
("color", "standard color"),
|
("color", "standard color"),
|
||||||
("error_color", "color to use when non zero exit code is returned"),
|
("error_color", "color to use when non zero exit code is returned"),
|
||||||
"format"
|
"format"
|
||||||
@ -38,7 +38,7 @@ class Shell(IntervalModule):
|
|||||||
out = stderr
|
out = stderr
|
||||||
|
|
||||||
full_text = self.format.format(output=out).strip()
|
full_text = self.format.format(output=out).strip()
|
||||||
if not full_text and not self.ignore_emtpy_stdout:
|
if not full_text and not self.ignore_empty_stdout:
|
||||||
full_text = "Command `%s` returned %d" % (self.command, retvalue)
|
full_text = "Command `%s` returned %d" % (self.command, retvalue)
|
||||||
|
|
||||||
self.output = {
|
self.output = {
|
||||||
|
Loading…
Reference in New Issue
Block a user