Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
2bebb3ef
Commit
2bebb3ef
authored
Jan 08, 2021
by
Pierre Dittgen
Browse files
Add error log if CONFIG env variable is not set
parent
26b2fdc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
2bebb3ef
# Changelog
## next
-
Add explicit error message on startup if
`CONFIG`
env variable is not set
## 0.4.0a5
-
Fix
`Recommandations`
title display
...
...
validata_ui/config.py
View file @
2bebb3ef
...
...
@@ -48,6 +48,9 @@ if SHIELDS_IO_BASE_URL:
SHIELDS_IO_BASE_URL
=
without_trailing_slash
(
SHIELDS_IO_BASE_URL
)
CONFIG_FILE
=
os
.
environ
.
get
(
"CONFIG_FILE"
)
or
None
if
not
CONFIG_FILE
:
log
.
error
(
"CONFIG_FILE environment variable is not set, can't go further"
)
CONFIG
=
None
if
CONFIG_FILE
:
CONFIG_FILE
=
Path
(
CONFIG_FILE
)
...
...
Write
Preview
Supports
Markdown
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