Skip to content

Commit

Permalink
Remove getattr() check for results.
Browse files Browse the repository at this point in the history
  • Loading branch information
daspecster committed Nov 8, 2016
1 parent 09390d0 commit 506cb91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions speech/google/cloud/speech/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ def streaming_recognize(self, sample, language_code=None,
single_utterance,
interim_results)
for response in responses:
results = getattr(response, 'results', [])
for result in results:
for result in response.results:
if result.is_final or interim_results:
yield [Alternative.from_pb(alternative)
for alternative in result.alternatives]
Expand Down

0 comments on commit 506cb91

Please sign in to comment.