nosec comment
This commit is contained in:
parent
c5ec5fa41f
commit
0320c04be2
|
@ -73,11 +73,8 @@ def from_file(file_path, silent=False):
|
||||||
d.__file__ = file_path
|
d.__file__ = file_path
|
||||||
try:
|
try:
|
||||||
with open(file_path) as config_file:
|
with open(file_path) as config_file:
|
||||||
exec(
|
exec( # nosec: config file safe
|
||||||
compile(
|
compile(config_file.read(), file_path, "exec"), d.__dict__
|
||||||
config_file.read(), file_path, "exec" # nosec: config file safe
|
|
||||||
),
|
|
||||||
d.__dict__,
|
|
||||||
)
|
)
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
if silent and e.errno in (errno.ENOENT, errno.EISDIR):
|
if silent and e.errno in (errno.ENOENT, errno.EISDIR):
|
||||||
|
|
Loading…
Reference in New Issue