if path:
with open(path, "rb") as f:
output_queue.put((pdb_id, f.read()))
else:
// The structure could not be downloaded. Interesting :\
self.run.warning("%s, chain %s was not downloaded :\\" % (pdb_id[:4], pdb_id[-1]))
After Change
while True:
pdb_id = available_index_queue.get(True)
structure = {}
structure["id"] = pdb_id
structure["pdb_content"] = self.download_and_return_pdb_content(pdb_id)
structure["failed"] = False if structure["pdb_content"] else True
structure["cluster_info"] = self.get_cluster_info(pdb_id)
output_queue.put(structure)
// Never reaches here because process is killed by main thread
return