Ensure iface_dict not being populated will not produce a stacktrace

I wouldn't consider this a complete solution, for the reason left in the comment, but it /does/ at least help.
This commit is contained in:
Michael Lustfield 2016-12-01 21:55:52 -06:00 committed by GitHub
parent 4de2cb2805
commit 3a8168667b

View file

@ -555,6 +555,8 @@ def _parse_interfaces(interface_files=None):
for interface_file in interface_files:
with salt.utils.fopen(interface_file) as interfaces:
# This ensures iface_dict exists, but does not ensure we're not reading a new interface.
iface_dict = {}
for line in interfaces:
# Identify the clauses by the first word of each line.
# Go to the next line if the current line is a comment