file.accumulated leads to TypeError: can only concatenate list (not "tuple") to list #2865

Closed
rhertzog opened this Issue Dec 11, 2012 · 1 comment

Projects

None yet

2 participants

Contributor

With such an entry:

custom_pg_hba_entries:
  file.accumulated:
    - filename: /etc/postgresql/9.1/main/pg_hba.conf
    - text:
      - local librement librement peer
    - require_in:
      - file: /etc/postgresql/9.1/main/pg_hba.conf

I get the following error:

    State: - file
    Name:      custom_pg_hba_entries
    Function:  accumulated
        Result:    False
        Comment:   An exception occured in this state: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 884, in call
    *cdata['args'], **cdata['kwargs'])
  File "/usr/lib/python2.7/dist-packages/salt/states/file.py", line 1679, in accumulated
    kwargs.get('require_in', ()) + kwargs.get('watch_in', ())):
TypeError: can only concatenate list (not "tuple") to list

It looks like those "()" as default values should be replaced by "[]".

@thatch45 thatch45 closed this in cecd105 Dec 11, 2012
Owner

Yes, an easy fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment