Eclectic Media Git caffeine / 782129c
Suppressed script output when output is empty Ariana Giroux 9 months ago
1 changed file(s) with 8 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
6262 print(Fore.RED + 'The caffeine_script is not finished! Waiting!')
6363 script_process.wait()
6464
65 print(Fore.RESET + '\n---\nScript STDOUT\n')
65 process_out, process_err = script_process.communicate()
6666
67 process_out, process_err = script_process.communicate()
68 print(Fore.RESET + process_out.decode('UTF-8'))
67 if len(process_out.decode('UTF-8')) > 0:
68 print(Fore.RESET + '\n---\nScript STDOUT\n' + process_out.decode('UTF-8'))
69
6970 if len(process_err.decode('UTF-8')) > 0:
7071 print(Fore.RED + '---\nScript STDERR\n' + process_err.decode('UTF-8'))
7172
106107 print(Fore.RED + 'The caffeine_script is not finished! Waiting!')
107108 script_process.wait()
108109
109 print(Fore.RESET + '\n---\nScript STDOUT\n')
110 process_out, process_err = script_process.communicate()
110111
111 process_out, process_err = script_process.communicate()
112 print(Fore.RESET + process_out.decode('UTF-8'))
112 if len(process_out.decode('UTF-8')) > 0:
113 print(Fore.RESET + '\n---\nScript STDOUT\n' + process_out.decode('UTF-8'))
114
113115 if len(process_err.decode('UTF-8')) > 0:
114116 print(Fore.RED + '---\nScript STDERR\n' + process_err.decode('UTF-8'))
115117