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
production
building-knowledge-centre
building-dao
Commits
f2b87f20
Commit
f2b87f20
authored
Oct 15, 2020
by
unknown
Browse files
Add warning message when calling registry
parent
206f9a5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
building_dao/settings.py
building_dao/settings.py
+3
-1
No files found.
building_dao/settings.py
View file @
f2b87f20
"""Store settings"""
import
logging
from
MaxIcsRegistry
import
MaxIcsRegistry
class
Settings
:
...
...
@@ -7,10 +7,12 @@ class Settings:
"""Settings for BKC communication"""
def
__init__
(
self
,
staging
:
bool
=
False
,
registry
=
None
,
**
kwargs
)
->
None
:
self
.
logger
=
logging
.
getLogger
(
self
.
__class__
.
__name__
)
staging
=
kwargs
.
get
(
"staging"
,
False
)
registry
=
kwargs
.
get
(
"registry"
)
if
not
registry
:
self
.
logger
.
warning
(
"Registry is not set when calling initializing Building. Calling registry..."
)
registry
=
MaxIcsRegistry
.
from_env
(
staging
=
staging
)
building_center_info
=
registry
.
get_info
(
"building-knowledge-information-center"
)
...
...
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