Skip to content

Commit

Permalink
handle if basePath is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
KissPeter committed Feb 6, 2020
1 parent db08c21 commit d424a78
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions apifuzzer/swagger_template_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ def compile_base_url(self, alternate_url):
:type alternate_url: string
"""
if alternate_url:
_base_url = "/".join([
alternate_url.strip('/'),
self.api_resources['basePath'].strip('/')
])
_base_url = "/".join([alternate_url.strip('/'), self.api_resources.get('basePath', '').strip('/')])
else:
if 'http' in self.api_resources['schemes']:
_protocol = 'http'
Expand Down

0 comments on commit d424a78

Please sign in to comment.