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
206f9a5d
Commit
206f9a5d
authored
Oct 12, 2020
by
unknown
Browse files
no loger pass registry and staging as separate kwarg arguments
parent
3d684c94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
building_dao/building_generic.py
building_dao/building_generic.py
+1
-4
building_dao/settings.py
building_dao/settings.py
+3
-0
No files found.
building_dao/building_generic.py
View file @
206f9a5d
...
...
@@ -42,14 +42,11 @@ class BuildingGeneric:
def
__init__
(
self
,
uid
:
str
=
None
,
**
kwargs
)
->
None
:
staging
=
kwargs
.
get
(
"staging"
,
False
)
registry
=
kwargs
.
get
(
"registry"
)
self
.
logger
=
logging
.
getLogger
(
self
.
__class__
.
__name__
)
self
.
_uid
=
uid
self
.
_building
=
None
self
.
settings
=
Settings
(
staging
=
staging
,
registry
=
registry
,
**
kwargs
)
self
.
settings
=
Settings
(
**
kwargs
)
if
self
.
_uid
:
self
.
fetch
(
timeout
=
kwargs
.
get
(
"timeout"
,
None
))
...
...
building_dao/settings.py
View file @
206f9a5d
...
...
@@ -7,6 +7,9 @@ class Settings:
"""Settings for BKC communication"""
def
__init__
(
self
,
staging
:
bool
=
False
,
registry
=
None
,
**
kwargs
)
->
None
:
staging
=
kwargs
.
get
(
"staging"
,
False
)
registry
=
kwargs
.
get
(
"registry"
)
if
not
registry
:
registry
=
MaxIcsRegistry
.
from_env
(
staging
=
staging
)
...
...
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