mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Fix 'source' file error handling
Ticket: Reviewed By: Testing Done:
This commit is contained in:
@ -141,7 +141,12 @@ class networkInterfaces():
|
||||
self.logger.debug('processing sourced line ..\'%s\'' %lines[cur_idx])
|
||||
sourced_file = re.split(self._ws_split_regex, lines[cur_idx], 2)[1]
|
||||
if sourced_file:
|
||||
for f in glob.glob(sourced_file):
|
||||
filenames = glob.glob(sourced_file)
|
||||
if not filenames:
|
||||
self._parse_error(self._currentfile, lineno,
|
||||
'cannot find source file %s' %sourced_file)
|
||||
return 0
|
||||
for f in filenames:
|
||||
self.read_file(f)
|
||||
else:
|
||||
self._parse_error(self._currentfile, lineno,
|
||||
|
Reference in New Issue
Block a user