tornado-redis icon indicating copy to clipboard operation
tornado-redis copied to clipboard

when subscribe more than one channel, there are bad codes in this project.

Open hzdx200 opened this issue 8 years ago • 0 comments

Fault condition: in tornado-redis/demos/websockets/app.py, I hope to sub more than one channels. yield tornado.gen.Task(self.client.subscribe, 'test_channel1,test_channel2'). But, when I run the app.py, subscribe method is provided by tornadoredis/client.py. 1036 if isinstance(channels, str) or (not PY3 and isinstance(channels, unicode)): 1037 channels = [channels] As line 1037, channels will be changed into ["test_channel1, test_channel2"], rather than ["test_channel1", "test_channel2"]. Improvement: channels = [channels] is changed into channels = channels.split(',').

If there are some wrong understanding, please tell me. Thanks.

David.c.wang

hzdx200 avatar Jul 15 '16 06:07 hzdx200