Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.cmdline
Commits
c63757b4
Commit
c63757b4
authored
Nov 28, 2019
by
Samuel GAIST
Browse files
[webapi] Fix URL building
The current implementation lost the path of the configured platform URL.
parent
bca02c60
Changes
1
Show whitespace changes
Inline
Side-by-side
beat/cmdline/webapi.py
View file @
c63757b4
...
@@ -79,9 +79,14 @@ class WebAPI(object):
...
@@ -79,9 +79,14 @@ class WebAPI(object):
}
}
def
__build_url
(
self
,
path
):
def
__build_url
(
self
,
path
):
url
=
"{schema}://{host}{path}"
.
format
(
platform
=
self
.
parsed
.
geturl
()
schema
=
self
.
parsed
[
0
],
host
=
self
.
parsed
[
1
],
path
=
path
if
platform
.
endswith
(
"/"
):
)
platform
=
platform
[:
-
1
]
if
path
.
startswith
(
"/"
):
path
=
path
[
1
:]
url
=
"{platform}/{path}"
.
format
(
platform
=
platform
,
path
=
path
)
return
url
return
url
def
get
(
self
,
path
):
def
get
(
self
,
path
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment