fixed run.sh & fixed zero-length string bug
This commit is contained in:
parent
96e6cb2054
commit
3b6fa63e7b
5
main.py
5
main.py
|
@ -24,7 +24,10 @@ def print_bar():
|
||||||
|
|
||||||
def create_module_string(pre, prefix, command, post):
|
def create_module_string(pre, prefix, command, post):
|
||||||
cmd_output = run(command, shell=True, capture_output=True, text=True).stdout.strip()
|
cmd_output = run(command, shell=True, capture_output=True, text=True).stdout.strip()
|
||||||
return (pre + padding + prefix + cmd_output + padding + post)
|
if cmd_output != "":
|
||||||
|
return (pre + padding + prefix + cmd_output + padding + post)
|
||||||
|
else:
|
||||||
|
return cmd_output
|
||||||
|
|
||||||
|
|
||||||
def new_module_thread(alignment, pre, name, prefix, command, post, refresh):
|
def new_module_thread(alignment, pre, name, prefix, command, post, refresh):
|
||||||
|
|
Loading…
Reference in a new issue