Skip to content

Redis.smove does not encode value #9

Closed
@Bernie

Description

@Bernie

All other operations pass the value through the _encode method to convert ints, floats, and unicode into the proper string object with appropriate charset. smove does not do this, and passes the value (named member) directly into the command. This results in an AttributeError if the member being passed in is not a string type. Further errors may also occur if the type is a unicode with unsupported characters, or is a list/set/dict.

e.g.:
r = redis.Redis()
r.smove('set', 'list', 3)
Traceback (most recent call last):
File "", line 1, in
File "redis.py", line 808, in smove
src, dst, len(member), member
TypeError: object of type 'int' has no len()

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