From 57b562fc811f81ec4f0f1497035761515470c42f Mon Sep 17 00:00:00 2001 From: Dan Dembinski Date: Sat, 23 May 2020 23:24:23 -0400 Subject: [PATCH] more work on output parsing --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 63f4af5..ce4852c 100644 --- a/main.py +++ b/main.py @@ -63,10 +63,10 @@ def download(): # os.system(execute) # exec_command = subprocess.Popen(execute, stdout=subprocess.PIPE) # book['output'] = exec_command.communicate() - stdout = exec_command.communicate()[0] - # print(stdout) + exec_command.communicate() + output = exec_command.stdout.readline() book['command'] = exec_command.args - if stdout in 'No new chapters found': + if str(output) in 'No new chapters found': notupdated.append(book['title'] + 'not updated') updated.append(book)