File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1551,6 +1551,9 @@ def _encode(self, value):
15511551 value = value .encode ('utf-8' , 'strict' )
15521552 return value
15531553
1554+ def _log (self , level , msg ):
1555+ pass
1556+
15541557
15551558def get_total_milliseconds (td ):
15561559 return int ((td .days * 24 * 60 * 60 + td .seconds ) * 1000 + td .microseconds / 1000.0 )
Original file line number Diff line number Diff line change 1+ import logging
12import sys
23import threading
34try :
@@ -61,7 +62,12 @@ def _call(*call_args):
6162 lua_globals .redis = {"call" : _call ,
6263 # TODO wrap _call with try to implement "pcall": _pcall,
6364 "status_reply" : lambda status : self ._python_to_lua ({"ok" : status }),
64- "error_reply" : lambda error : self ._python_to_lua ({"err" : error })
65+ "error_reply" : lambda error : self ._python_to_lua ({"err" : error }),
66+ "log" : client ._log ,
67+ "LOG_DEBUG" : logging .DEBUG ,
68+ "LOG_VERBOSE" : logging .INFO ,
69+ "LOG_NOTICE" : logging .WARNING ,
70+ "LOG_WARNING" : logging .ERROR
6571 }
6672 return self ._lua_to_python (lua .execute (self .script ), return_status = True )
6773
You can’t perform that action at this time.
0 commit comments