Skip to content

Commit

Permalink
Ensure URLs are formed correctly when the user-entered html_pub_url i…
Browse files Browse the repository at this point in the history
…s missing the trailing slash
  • Loading branch information
rhigman committed Aug 2, 2023
1 parent 5606697 commit f4ac3a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/thoth_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ def get_html_pub_url(thoth_data):
'location URL not specified. Please, '
'add it and re-run the process.')

return url
# Add trailing slash if not present - needed for correct URL concatenation
if url.endswith('/'):
return url
else:
return url + '/'

def run():
parser = argparse.ArgumentParser(description='Thoth wrapper')
Expand Down

0 comments on commit f4ac3a7

Please sign in to comment.