Dealing with broken Wordpress PuSH plugin by subscribing to its requested topic url.

This commit is contained in:
Samuel Clay 2012-03-30 16:58:10 -07:00
parent 5a60b1047f
commit 06a11d5fb4

View file

@ -68,8 +68,8 @@ class PushSubscriptionManager(models.Manager):
if not force_retry and 'You may only subscribe to' in error:
extracted_topic = re.search("You may only subscribe to (.*?) ", error)
if extracted_topic:
subscription = self.objects.subscribe(extracted_topic.group(1),
feed=feed, hub=hub, force_retry=True)
subscription = self.subscribe(extracted_topic.group(1),
feed=feed, hub=hub, force_retry=True)
subscription.save()
feed.setup_push()