Skip to content

Commit 2eab4ad

Browse files
committed
synpy-1671: Correct url construction
1 parent ccc043c commit 2eab4ad

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

synapseclient/api/web_services.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,14 @@ async def main():
102102

103103
# Construct the URL
104104
portal_endpoint = client.portalEndpoint
105+
106+
if portal_endpoint[-1] != "/":
107+
portal_endpoint += "/"
108+
105109
if subpage_id is None:
106-
url = f"{portal_endpoint}/Synapse:{synapse_id}"
110+
url = f"{portal_endpoint}Synapse:{synapse_id}"
107111
else:
108-
url = f"{portal_endpoint}/Wiki:{synapse_id}/ENTITY/{subpage_id}"
112+
url = f"{portal_endpoint}Wiki:{synapse_id}/ENTITY/{subpage_id}"
109113

110114
# Open in browser
111115
webbrowser.open(url)

0 commit comments

Comments
 (0)