more work on output parsing
This commit is contained in:
6
main.py
6
main.py
@@ -63,10 +63,10 @@ def download():
|
|||||||
# os.system(execute)
|
# os.system(execute)
|
||||||
# exec_command = subprocess.Popen(execute, stdout=subprocess.PIPE)
|
# exec_command = subprocess.Popen(execute, stdout=subprocess.PIPE)
|
||||||
# book['output'] = exec_command.communicate()
|
# book['output'] = exec_command.communicate()
|
||||||
stdout = exec_command.communicate()[0]
|
exec_command.communicate()
|
||||||
# print(stdout)
|
output = exec_command.stdout.readline()
|
||||||
book['command'] = exec_command.args
|
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')
|
notupdated.append(book['title'] + 'not updated')
|
||||||
updated.append(book)
|
updated.append(book)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user