diff options
-rwxr-xr-x | format-notify | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/format-notify b/format-notify index 0356587..42123e3 100755 --- a/format-notify +++ b/format-notify @@ -27,11 +27,12 @@ def main(): service = sys.argv.pop(1) status = sys.argv.pop(1) output = sys.argv.pop(1) + msg = "%s %s: %s\n" % (service, + add_color(status), + clean_output(status, output)) if file == '--test': - print("%s %s: %s" % (service, - add_color(status), - clean_output(status, output))) + sys.stdout.write(msg) sys.exit(0) if not os.path.exists(file): @@ -48,9 +49,7 @@ def main(): else: time.sleep(.5) - os.write(f, "%s %s: %s\n" % (service, - add_color(status), - clean_output(status, output))) + os.write(f, msg) os.close(f) if __name__ == '__main__': |