Skip to content

Commit

Permalink
fix:Using DefaultParser instead of BaseParser
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Jul 16, 2023
1 parent 5cde5e7 commit bdbe88c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions fakeredis/_basefakesocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
from typing import List, Any, Tuple

import redis


if redis.VERSION >= (5, 0):
from redis.parsers import BaseParser
else:
from redis.connection import BaseParser
from redis.connection import DefaultParser

from . import _msgs as msgs
from ._command_args_parsing import extract_args
Expand Down Expand Up @@ -160,7 +155,7 @@ def _run_command(self, func, sig, args, from_script):
return result

def _decode_error(self, error):
return BaseParser().parse_error(error.value)
return DefaultParser(socket_read_size=65536).parse_error(error.value)

def _decode_result(self, result):
"""Convert SimpleString and SimpleError, recursively"""
Expand Down

0 comments on commit bdbe88c

Please sign in to comment.