Fix "variable referenced before assignment" error

This commit is contained in:
Erik Johnson 2013-02-05 12:44:13 -06:00
parent 03b9ad2727
commit 81a4660cad

View File

@ -1936,6 +1936,7 @@ class BaseHighState(object):
high data structure. high data structure.
''' '''
highstate = {} highstate = {}
all_errors = []
for env, states in matches.items(): for env, states in matches.items():
mods = set() mods = set()
for sls_match in states: for sls_match in states:
@ -1943,9 +1944,10 @@ class BaseHighState(object):
state, errors = self.render_state(sls, env, mods, matches) state, errors = self.render_state(sls, env, mods, matches)
if state: if state:
self.merge_included_states(highstate, state, errors) self.merge_included_states(highstate, state, errors)
all_errors.extend(errors)
self.clean_duplicate_extends(highstate) self.clean_duplicate_extends(highstate)
return highstate, errors return highstate, all_errors
def clean_duplicate_extends(self, highstate): def clean_duplicate_extends(self, highstate):