File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def __init__(
2525 start_time : datetime ,
2626 service_url : str ,
2727 registration_interval_sec : int ,
28- application_metadata : dict
28+ application_metadata : Optional [ dict ] = None
2929 ) -> None :
3030 self .registration_url = registration_url
3131 self .registration_auth = registration_auth
@@ -35,7 +35,7 @@ def __init__(
3535 self .service_url = service_url if service_url .endswith ("/" ) else service_url + "/"
3636 self .registration_interval_sec = registration_interval_sec
3737 self .instance_id = None
38- self .application_metadata = application_metadata
38+ self .application_metadata = application_metadata if application_metadata else {}
3939
4040 self .should_continue_registration_schedule : bool = False
4141 self .disable_certificate_validation_for_https_registration : bool = \
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def __init__(
3838 logfile_max_size : int = 10000 ,
3939 logfile_formatter : str = default_logfile_format ,
4040 auto_deregister : bool = True ,
41- metadata : dict = None
41+ metadata : Optional [ dict ] = {}
4242 ) -> None :
4343 """The entry point for integrating pyctuator with a web-frameworks such as FastAPI and Flask.
4444
@@ -91,6 +91,8 @@ def __init__(
9191
9292 self .boot_admin_registration_handler : Optional [BootAdminRegistrationHandler ] = None
9393
94+ self .metadata = metadata
95+
9496 root_logger = logging .getLogger ()
9597 # If application did not initiate logging module, add default handler to root logger
9698 # logging.info implicitly calls logging.basicConfig(), see logging.basicConfig in Python's documentation.
@@ -121,7 +123,7 @@ def __init__(
121123 start_time ,
122124 app_url ,
123125 registration_interval_sec ,
124- metadata
126+ self . metadata
125127 )
126128
127129 # Deregister from SBA on exit
You can’t perform that action at this time.
0 commit comments