summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2017-02-05 15:58:32 -0500
committerGitHub <noreply@github.com>2017-02-05 15:58:32 -0500
commit84742495fd952f878fa6d0725d03d867ec39cd52 (patch)
treeb9301a4338054044e8ff083945c6dffb3fca52ff
parentef9a5f050d51ed376f559c73b21e42069458b5b9 (diff)
parent311a8402fd04799fd5b49cf1d89d098e049e1793 (diff)
downloadredis-py-84742495fd952f878fa6d0725d03d867ec39cd52.tar.gz
Merge pull request #831 from AngusP/master
Add pattern support to PUBSUB CHANNELS (minor, fix)
-rwxr-xr-xredis/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index f11e2e5..b5fda9c 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -2017,11 +2017,11 @@ class StrictRedis(object):
"""
return self.execute_command('PUBLISH', channel, message)
- def pubsub_channels(self):
+ def pubsub_channels(self, pattern='*'):
"""
Return a list of channels that have at least one subscriber
"""
- return self.execute_command('PUBSUB CHANNELS')
+ return self.execute_command('PUBSUB CHANNELS', pattern)
def pubsub_numpat(self):
"""