File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -571,22 +571,27 @@ def LoadClientConfigFile(self, client_config_file=None):
571
571
pass # The service auth fields are not present, handling code can go here.
572
572
573
573
def LoadServiceConfigSettings (self ):
574
- """Loads client configuration from settings file .
574
+ """Loads client configuration from settings.
575
575
:raises: InvalidConfigError
576
576
"""
577
- for file_format in ["json" , "pkcs12" ]:
578
- config = f"client_{ file_format } _file_path"
577
+ configs = [
578
+ "client_pkcs12_file_path" ,
579
+ "client_json_file_path" ,
580
+ "client_json_dict" ,
581
+ "client_json" ,
582
+ ]
583
+
584
+ for config in configs :
579
585
value = self .settings ["service_config" ].get (config )
580
586
if value :
581
587
self .client_config [config ] = value
582
588
break
583
589
else :
584
590
raise InvalidConfigError (
585
- "Either json or pkcs12 file path required "
586
- "for service authentication"
591
+ f"One of { configs } is required for service authentication"
587
592
)
588
593
589
- if file_format == "pkcs12 " :
594
+ if config == "client_pkcs12_file_path " :
590
595
self .SERVICE_CONFIGS_LIST .append ("client_service_email" )
591
596
592
597
for config in self .SERVICE_CONFIGS_LIST :
You can’t perform that action at this time.
0 commit comments