mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
implement code review
This commit is contained in:
@@ -191,10 +191,8 @@ class networkInterfaces():
|
|||||||
|
|
||||||
folders = glob.glob(sourced_directory)
|
folders = glob.glob(sourced_directory)
|
||||||
for folder in folders:
|
for folder in folders:
|
||||||
filenames = [file for file in os.listdir(folder) if re.match(r'^[a-zA-Z0-9_-]+$', file)]
|
for file in os.listdir(folder):
|
||||||
|
self.read_file(os.path.join(folder, file))
|
||||||
for f in filenames:
|
|
||||||
self.read_file(os.path.join(folder, f))
|
|
||||||
else:
|
else:
|
||||||
self._parse_error(self._currentfile, lineno,
|
self._parse_error(self._currentfile, lineno,
|
||||||
'unable to read source-directory line')
|
'unable to read source-directory line')
|
||||||
|
Reference in New Issue
Block a user