Commit 19c7a916 by Eric Coissac

Allows for calling getConfiguration without parametter to get the

default configuration
parent bc04add3
...@@ -6,5 +6,5 @@ cpdef str getRootConfigName() ...@@ -6,5 +6,5 @@ cpdef str getRootConfigName()
cdef dict buildDefaultConfiguration(str root_config_name, cdef dict buildDefaultConfiguration(str root_config_name,
dict config) dict config)
cpdef dict getConfiguration(str root_config_name, cpdef dict getConfiguration(str root_config_name=?,
dict config) dict config=?)
\ No newline at end of file \ No newline at end of file
...@@ -57,13 +57,20 @@ cdef dict buildDefaultConfiguration(str root_config_name, ...@@ -57,13 +57,20 @@ cdef dict buildDefaultConfiguration(str root_config_name,
return __default_config__ return __default_config__
cpdef dict getConfiguration(str root_config_name, cpdef dict getConfiguration(str root_config_name="__default__",
dict config): dict config={}):
global __default_config__ global __default_config__
if '__done__' in __default_config__: if '__done__' in __default_config__:
return __default_config__ return __default_config__
if root_config_name=="__default__":
raise RuntimeError("No root_config_name specified")
if not config:
raise RuntimeError("Base configuration is empty")
config = buildDefaultConfiguration(root_config_name, config = buildDefaultConfiguration(root_config_name,
config) config)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment