summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorAaron Westendorf <aaron@agoragames.com>2013-05-10 08:45:05 -0400
committerAaron Westendorf <aaron@agoragames.com>2013-05-10 08:45:05 -0400
commitcfe1041bbb8a8887531810429879bffbe705b03a (patch)
tree1d3208505a3d800ece644ab9f1f512ff950470ff /redis/client.py
parent57f92d9df81cccc0a63bc0bf1a1f8d660e3fb76c (diff)
downloadredis-py-cfe1041bbb8a8887531810429879bffbe705b03a.tar.gz
from_url supports URI without a port number, defaults to 6379
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py2
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,