mirror of
https://github.com/jacobmanning/hangouts-parser.git
synced 2025-01-22 09:22:04 -05:00
Merge pull request #2 from jacobmanning/feature/check-for-conversation-state
Add check for missing conversation_state
This commit is contained in:
commit
f107b7cb25
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue