no need for a second loop. Just use the one already being used:
@@ -330,6 +330,9 @@ def Jobs():
json.dump(new_file, outfile)
outfile.write("\n")
+ if 'vent-plugin' in container.attrs['Config']['Labels']:
+ container.remove()
+
# add extra one to account for file that just finished if the file was
# just created since file_names is processed near the beginning
if file_status == 'w' and len(file_names) == 1:
