Merge pull request #10 from cberner/master

This patch fixes the way urls are parsed to support blank passwords, usernames, hostnames...etc. This is particularly important in dev environments with Postgres, where blank passwords currently don't work
This commit is contained in:
Kenneth Reitz 2014-01-08 11:12:37 -08:00
commit 19d7c8f1b9

View file

@ -71,11 +71,11 @@ def parse(url):
# Update with environment configuration.
config.update({
'NAME': path,
'USER': url.username,
'PASSWORD': url.password,
'HOST': url.hostname,
'PORT': url.port,
'NAME': path or '',
'USER': url.username or '',
'PASSWORD': url.password or '',
'HOST': url.hostname or '',
'PORT': url.port or '',
})
if url.scheme in SCHEMES: