mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Remove next(iter()) extraction
This is no longer needed since we're invoking the state module directly and not via the state compiler.
This commit is contained in:
parent
0147f78ab5
commit
28651a6699
1 changed files with 0 additions and 11 deletions
|
@ -897,17 +897,6 @@ def extracted(name,
|
|||
ret['comment'] = '\n'.join([str(x) for x in file_result])
|
||||
return ret
|
||||
|
||||
# Get actual state result. The state.single return is a single-element
|
||||
# dictionary with the state's unique ID at the top level, and its value
|
||||
# being the state's return dictionary. next(iter(dict_name)) will give
|
||||
# us the value of the first key, so
|
||||
# file_result[next(iter(file_result))] will give us the results of the
|
||||
# state.single we just ran.
|
||||
try:
|
||||
file_result = file_result[next(iter(file_result))]
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
if not file_result['result']:
|
||||
log.debug('failed to download {0}'.format(source_match))
|
||||
|
|
Loading…
Add table
Reference in a new issue