Skip to content

Commit 506cb91

Browse files
committed
Remove getattr() check for results.
1 parent 09390d0 commit 506cb91

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

speech/google/cloud/speech/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ def streaming_recognize(self, sample, language_code=None,
240240
single_utterance,
241241
interim_results)
242242
for response in responses:
243-
results = getattr(response, 'results', [])
244-
for result in results:
243+
for result in response.results:
245244
if result.is_final or interim_results:
246245
yield [Alternative.from_pb(alternative)
247246
for alternative in result.alternatives]

0 commit comments

Comments
 (0)