raise exception when src file is not found in net_config
This will now raise an exception if the file path specified in src is not found and the module will gracefully error. ref #4797
This commit is contained in:
parent
4e325274d6
commit
16d6274276
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ class ActionModule(ActionBase):
|
||||||
source = self._loader.path_dwim_relative(working_path, src)
|
source = self._loader.path_dwim_relative(working_path, src)
|
||||||
|
|
||||||
if not os.path.exists(source):
|
if not os.path.exists(source):
|
||||||
return
|
raise ValueError('path specified in src not found')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(source, 'r') as f:
|
with open(source, 'r') as f:
|
||||||
|
|
Loading…
Reference in a new issue