Skip to content

Typecast port (int) to string in url->dsn conversion#53

Merged
chadwhitacre merged 1 commit intoliberapay:masterfrom
rohitpaulk:fix-url-dsn-conversion
Oct 5, 2015
Merged

Typecast port (int) to string in url->dsn conversion#53
chadwhitacre merged 1 commit intoliberapay:masterfrom
rohitpaulk:fix-url-dsn-conversion

Conversation

@rohitpaulk
Copy link
Copy Markdown
Contributor

Ran into this when working on Masspay over at gratipay/gratipay.com#3356.

Here's a traceback:

  File "/xxx/gratipay/gratipay.com/gratipay/main.py", line 64, in <module>
    website.db = gratipay.wireup.db(env)
  File "/xxx/gratipay/gratipay.com/gratipay/wireup.py", line 54, in db
    db = GratipayDB(dburl, maxconn=maxconn)
  File "/xxx/gratipay/gratipay.com/env/lib/python2.7/site-packages/postgres/__init__.py", line 323, in __init__
    dsn = url_to_dsn(url)
  File "/xxx/gratipay/gratipay.com/env/lib/python2.7/site-packages/postgres/__init__.py", line 217, in url_to_dsn
    dsn += " port=" + port
TypeError: coercing to Unicode: need string or buffer, int found

@rohitpaulk rohitpaulk force-pushed the fix-url-dsn-conversion branch from 7f04bff to f6c34d1 Compare October 5, 2015 19:21
chadwhitacre added a commit that referenced this pull request Oct 5, 2015
Typecast port (int) to string in url->dsn conversion
@chadwhitacre chadwhitacre merged commit 948d26f into liberapay:master Oct 5, 2015
@rohitpaulk rohitpaulk deleted the fix-url-dsn-conversion branch October 6, 2015 04:49
chadwhitacre added a commit to gratipay/gratipay.com that referenced this pull request Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants