mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix variable definition in wrong scope
File "/usr/lib/python2.7/dist-packages/salt/states/pkg.py", line 702 UnboundLocalError: local variable 'modified_hold' referenced before assignment
This commit is contained in:
parent
4ee7dc8a44
commit
19e7264d3c
@ -620,6 +620,9 @@ def installed(
|
||||
'comment': ' '.join(comment)}
|
||||
|
||||
changes = {'installed': {}}
|
||||
modified_hold = None
|
||||
not_modified_hold = None
|
||||
failed_hold = None
|
||||
if targets:
|
||||
try:
|
||||
pkg_ret = __salt__['pkg.install'](name,
|
||||
@ -640,9 +643,6 @@ def installed(
|
||||
'comment': 'An error was encountered while installing '
|
||||
'package(s): {0}'.format(exc)}
|
||||
|
||||
modified_hold = None
|
||||
not_modified_hold = None
|
||||
failed_hold = None
|
||||
if 'pkg.hold' in __salt__:
|
||||
if 'hold' in kwargs:
|
||||
if kwargs['hold']:
|
||||
|
Loading…
Reference in New Issue
Block a user