bugfix
This commit is contained in:
parent
eb7cd35d6d
commit
744ff585d5
@ -60,6 +60,18 @@ class FileOutZone(Exception):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.openfilename + ': not allowed to open'
|
return self.openfilename + ': not allowed to open'
|
||||||
|
|
||||||
|
def get_config_value(kstr):
|
||||||
|
keys = kstr.split('.')
|
||||||
|
config = getConfig()
|
||||||
|
for k in keys:
|
||||||
|
config = config.get(k)
|
||||||
|
if not config:
|
||||||
|
return None
|
||||||
|
return config
|
||||||
|
|
||||||
|
def get_definition(k):
|
||||||
|
return get_config_value(f'definition.{k}')
|
||||||
|
|
||||||
def openfile(url,m):
|
def openfile(url,m):
|
||||||
fp = abspath(url)
|
fp = abspath(url)
|
||||||
if fp is None:
|
if fp is None:
|
||||||
@ -169,3 +181,6 @@ def initEnv():
|
|||||||
g.NoPermission = NoPermission
|
g.NoPermission = NoPermission
|
||||||
g.password_encode = password
|
g.password_encode = password
|
||||||
g.current_fileno = current_fileno
|
g.current_fileno = current_fileno
|
||||||
|
g.get_config_value = get_config_value
|
||||||
|
g.get_definition = get_definition
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user