Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractalis
Commits
4cd6804a
Commit
4cd6804a
authored
May 15, 2018
by
Sascha Herzinger
Browse files
fixed bug in misc controller
parent
d9ff64c3
Pipeline
#4877
failed with stages
in 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
4cd6804a
...
...
@@ -62,7 +62,6 @@ test:
> /config.py
&& export FRACTALIS_CONFIG=/config.py
&& celery worker -D -A fractalis:celery -l debug --concurrency=1
&& pip3 install -r requirements.txt
&& pytest tests
"
dependencies
:
...
...
fractalis/misc/controller.py
View file @
4cd6804a
...
...
@@ -2,7 +2,7 @@
in any of the other categories."""
import
logging
import
pkg_resources
import
re
from
typing
import
Tuple
from
flask
import
Blueprint
,
jsonify
,
Response
...
...
@@ -14,5 +14,7 @@ logger = logging.getLogger(__name__)
@
misc_blueprint
.
route
(
'/version'
,
methods
=
[
'GET'
])
def
get_version
()
->
Tuple
[
Response
,
int
]:
version
=
pkg_resources
.
require
(
'fractalis'
)[
0
].
version
with
open
(
'setup.py'
)
as
setup_file
:
text
=
setup_file
.
read
()
version
=
re
.
search
(
r
'version=\'(\d+\.\d+\.\d+)\','
,
text
).
group
(
1
)
return
jsonify
({
'version'
:
version
}),
201
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