Skip to content

Commit 3cf40a0

Browse files
committed
remove misleading raise_for_status
1 parent 0715f7d commit 3cf40a0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

endpoints/getting-started/clients/google-jwt-client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ def make_jwt_request(signed_jwt, url='https://your-endpoint.com'):
6969
}
7070
response = requests.get(url, headers=headers)
7171

72-
response.raise_for_status()
73-
return response.text
72+
print(response.text)
7473
# [END endpoints_jwt_request]
7574

7675

@@ -96,4 +95,4 @@ def make_jwt_request(signed_jwt, url='https://your-endpoint.com'):
9695
args.sa_email,
9796
args.audience,
9897
expiry_length)
99-
print(make_jwt_request(keyfile_jwt, args.host))
98+
make_jwt_request(keyfile_jwt, args.host)

translate/cloud-client/beta_snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def batch_translate_text(project_id, input_uri, output_uri):
7070
input_configs=[input_config],
7171
output_config=output_config)
7272

73-
result = operation.result(90)
73+
result = operation.result(180)
7474

7575
print(u'Total Characters: {}'.format(result.total_characters))
7676
print(u'Translated Characters: {}'.format(result.translated_characters))

0 commit comments

Comments
 (0)