Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
print a warning when user try to use non-numeric index of redis
Browse files Browse the repository at this point in the history
  • Loading branch information
binux committed Apr 24, 2017
1 parent 06cd99d commit 941704d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyspider/message_queue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# http://binux.me
# Created on 2015-04-30 21:47:08

import logging

try:
from urllib import parse as urlparse
except ImportError:
Expand Down Expand Up @@ -49,6 +51,7 @@ def connect_message_queue(name, url=None, maxsize=0, lazy_limit=True):
try:
db = int(db[0])
except:
logging.warning('redis DB must zero-based numeric index, using 0 instead')
db = 0

password = parsed.password or None
Expand Down

0 comments on commit 941704d

Please sign in to comment.