Skip to content

Commit 2001d76

Browse files
authored
Fix deep / broken URL for service account setup. (googleapis#9164)
Closes googleapis#9157.
1 parent 10cc8a8 commit 2001d76

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

storage/google/cloud/storage/_signing.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
MULTIPLE_SPACES_RE = r"\s+"
3131
MULTIPLE_SPACES = re.compile(MULTIPLE_SPACES_RE)
3232

33+
SERVICE_ACCOUNT_URL = (
34+
"https://googleapis.dev/python/google-api-core/latest/"
35+
"auth.html#setting-up-a-service-account"
36+
)
37+
3338

3439
def ensure_signed_credentials(credentials):
3540
"""Raise AttributeError if the credentials are unsigned.
@@ -42,16 +47,11 @@ def ensure_signed_credentials(credentials):
4247
of :class:`google.auth.credentials.Signing`.
4348
"""
4449
if not isinstance(credentials, google.auth.credentials.Signing):
45-
auth_uri = (
46-
"https://google-cloud-python.readthedocs.io/en/latest/"
47-
"core/auth.html?highlight=authentication#setting-up-"
48-
"a-service-account"
49-
)
5050
raise AttributeError(
5151
"you need a private key to sign credentials."
52-
"the credentials you are currently using %s "
53-
"just contains a token. see %s for more "
54-
"details." % (type(credentials), auth_uri)
52+
"the credentials you are currently using {} "
53+
"just contains a token. see {} for more "
54+
"details.".format(type(credentials), SERVICE_ACCOUNT_URL)
5555
)
5656

5757

0 commit comments

Comments
 (0)