Skip to content

KeyError on repr in any ConnectionPool without host/port/db arguments #995

@carsonip

Description

@carsonip

To reproduce:

import redis
p = redis.ConnectionPool()
repr(p)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "venv/local/lib/python2.7/site-packages/redis/connection.py", line 939, in __repr__
    self.connection_class.description_format % self.connection_kwargs,
KeyError: 'host'

connection_kwargs does not require host, port and db but repr() requires it and will crash on call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions