Skip to content

Commit 5012bed

Browse files
Update src/huggingface_hub/utils/_http.py
Co-authored-by: Célina <hanouticelina@gmail.com>
1 parent 87e4be9 commit 5012bed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/huggingface_hub/utils/_http.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,7 @@ def fix_hf_endpoint_in_url(url: str, endpoint: Optional[str]) -> str:
340340
"""
341341
endpoint = endpoint.rstrip("/") if endpoint else constants.ENDPOINT
342342
# check if a proxy has been set => if yes, update the returned URL to use the proxy
343-
if endpoint not in (None, constants._HF_DEFAULT_ENDPOINT, constants._HF_DEFAULT_STAGING_ENDPOINT):
344-
endpoint.rstrip('/')
343+
if endpoint not in (constants._HF_DEFAULT_ENDPOINT, constants._HF_DEFAULT_STAGING_ENDPOINT):
345344
url = url.replace(constants._HF_DEFAULT_ENDPOINT, endpoint)
346345
url = url.replace(constants._HF_DEFAULT_STAGING_ENDPOINT, endpoint)
347346
return url

0 commit comments

Comments
 (0)