ohe ohe - 20 days ago 3
Git Question

UnboundLocalError triggered during the deployment of a salt minion

During a minion deployment, a

is raised by the
library used as a dependency of

An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1594, in call
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1491, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/git.py", line 519, in latest
if remote_rev_type == 'sha1':
UnboundLocalError: local variable 'remote_rev_type' referenced before assignment

It is very unclear to know what happen here. Any clue?


This was a bug in the library. Variable remote_rev_type was not initialized in all execution paths.

From the looks of the current salt-stack source code, I'd say it has been fixed.