Fix settings loader
Remove all class vars for vars that are only used in the loader itsef - entry_split_char - entry_convert - entry_set_empty The self.settings varr was never used, removed The config file path exists check is moved to the config data loader The internal _check_settings_abort is now __check_settings_abort to make it private lock file updates
This commit is contained in:
@@ -27,3 +27,7 @@ element_c=True
|
||||
email=foo@bar.com,other+bar-fee@domain-com.cp,
|
||||
email_not_mandatory=
|
||||
email_bad=gii@bar.com
|
||||
|
||||
[LoadTest]
|
||||
a.b.c=foo
|
||||
d:e:f=bar
|
||||
|
||||
@@ -113,6 +113,13 @@ def main():
|
||||
except ValueError as e:
|
||||
print(f"Could not load settings: {e}")
|
||||
|
||||
try:
|
||||
config_load = 'LoadTest'
|
||||
config_data = sl.load_settings(config_load, {})
|
||||
print(f"[{config_load}] Load: {config_load} -> {dump_data(config_data)}")
|
||||
except ValueError as e:
|
||||
print(f"Could not load settings: {e}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user