Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Salt '*' postgres.user_list ValueError with PostgreSql version 9.3beta2 #6352

Closed
Jokipii opened this issue Jul 27, 2013 · 1 comment
Closed
Assignees
Labels
Bug broken, incorrect, or confusing behavior help-wanted Community help is needed to resolve this severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@Jokipii
Copy link

Jokipii commented Jul 27, 2013

When using PostgreSql version 9.3beta2
command

salt '*' postgres.user_list

returns following error

    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 639, in _thread_return
        ret['return'] = func(*args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/salt/modules/postgres.py", line 371, in user_list
        if len(ver) >= 2 and int(ver[0]) >= 9 and int(ver[1]) >= 1:
    ValueError: invalid literal for int() with base 10: '3beta2'

Dirty fix is just convert first character from ver[1] to int. With that modification line 371 in salt/modules/postgres.py is:

        if len(ver) >= 2 and int(ver[0]) >= 9 and int(ver[1][0]) >= 1:
@basepi
Copy link
Contributor

basepi commented Jul 27, 2013

Thanks for the report. We definitely don't like tracebacks, we'll look into this, should be a pretty easy fix (we may just use your dirty one. =P)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior help-wanted Community help is needed to resolve this severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

3 participants