diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2013-05-10 10:39:57 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2013-05-10 10:39:57 -0700 |
commit | df1b691b01283c81e87ed7400ed8ca33f3329af8 (patch) | |
tree | 1d3208505a3d800ece644ab9f1f512ff950470ff /redis | |
parent | 57f92d9df81cccc0a63bc0bf1a1f8d660e3fb76c (diff) | |
parent | cfe1041bbb8a8887531810429879bffbe705b03a (diff) | |
download | redis-py-df1b691b01283c81e87ed7400ed8ca33f3329af8.tar.gz |
Merge pull request #345 from awestendorf/uri-without-port
from_url supports URI without a port number, defaults to 6379
Diffstat (limited to 'redis')
-rw-r--r-- | redis/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index c6d9ca2..033fd3d 100644 --- a/redis/client.py +++ b/redis/client.py @@ -275,7 +275,7 @@ class StrictRedis(object): except (AttributeError, ValueError): db = 0 - return cls(host=url.hostname, port=url.port, db=db, + return cls(host=url.hostname, port=int(url.port or 6379), db=db, password=url.password, **kwargs) def __init__(self, host='localhost', port=6379, |