We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 517897e commit cb83787Copy full SHA for cb83787
mockredis/script.py
@@ -47,7 +47,11 @@ def _call(*call_args):
47
response = client.call(*call_args)
48
return self._python_to_lua(response)
49
50
- lua_globals.redis = {"call": _call}
+ lua_globals.redis = {"call": _call,
51
+ # TODO wrap _call with try to implement "pcall": _pcall,
52
+ "status_reply": lambda status: self._python_to_lua({"ok": status}),
53
+ "error_reply": lambda error: self._python_to_lua({"err": error})
54
+ }
55
return self._lua_to_python(lua.execute(self.script), return_status=True)
56
57
@staticmethod
0 commit comments