Merge pull request #2 from jacobmanning/feature/check-for-conversation-state

Add check for missing conversation_state
This commit is contained in:
Jacob Manning 2021-03-10 19:28:42 -05:00 committed by GitHub
commit f107b7cb25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -238,6 +238,10 @@ def main(file_path):
LOG_INFO('Parsing JSON file: {}'.format(file_path))
json_archive = json.load(f)
if not 'conversation_state' in json_archive.keys():
LOG_ERROR('Could not find `conversation_state` in file {}'.format(file_path))
return
# Parse each conversation
for state in json_archive['conversation_state']:
conv = Conversation(state)