Unhandled Error
loveshell opened this issue · 1 comments
loveshell commented
redis-cli -h ip -x set foo < /etc/services
2016-07-25 00:50:18+0800 [RedisServer,0p,i] Unhandled Error
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/twisted/python/log.py", line 88, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib64/python2.7/site-packages/twisted/python/log.py", line 73, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib64/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib64/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 214, in doRead
return self._dataReceived(data)
File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 220, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/root/nosqlpot/redispot/redisdeploy.py", line 45, in dataReceived
if command.lower == "quit":
exceptions.UnboundLocalError: local variable 'command' referenced before assignment
2016-07-25 00:50:18+0800 [RedisServer,0,ip] End connection: local variable 'command' referenced before assignment
torque59 commented
@loveshell fixed this