Skip to content

Commit

Permalink
Avoid Early Convert ret['comment'] to String
Browse files Browse the repository at this point in the history
Fixes this exception:
An exception occurred in this state: Traceback (most recent call last):
  File "/var/tmp/.syops_b1274f_salt/py2/salt/state.py", line 1733, in call
    **cdata['kwargs'])
  File "/var/tmp/.syops_b1274f_salt/py2/salt/loader.py", line 1652, in wrapper
    return f(*args, **kwargs)
  File "/var/tmp/.syops_b1274f_salt/py2/salt/states/gpg.py", line 119, in present
    ret['comment'].append('Adding {0} to GPG keychain'.format(name))
AttributeError: 'str' object has no attribute 'append'
  • Loading branch information
kojiromike committed Nov 2, 2016
1 parent c68281b commit ceb7735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/states/gpg.py
Expand Up @@ -132,7 +132,7 @@ def present(name,
else:
ret['comment'].append('Invalid trust level {0}'.format(trust))

ret['comment'] = '\n'.join(ret['comment'])
ret['comment'] = '\n'.join(ret['comment'])
return ret


Expand Down Expand Up @@ -188,5 +188,5 @@ def absent(name,
ret['comment'].append('Deleting {0} from GPG keychain'.format(name))
else:
ret['comment'].append('{0} not found in GPG keychain'.format(name))
ret['comment'] = '\n'.join(ret['comment'])
ret['comment'] = '\n'.join(ret['comment'])
return ret

0 comments on commit ceb7735

Please sign in to comment.