This file is indexed.

/usr/lib/python2.7/dist-packages/planet/publish.py is in planet-venus 0~git9de2109-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os, sys
import urlparse
import planet
import pubsubhubbub_publisher as PuSH

def publish(config):
    log = planet.logger
    hub = config.pubsubhubbub_hub()
    link = config.link()

    # identify feeds
    feeds = []
    if hub and link:
        for root, dirs, files in os.walk(config.output_dir()):
            for file in files:
                 if file in config.pubsubhubbub_feeds():
                     feeds.append(urlparse.urljoin(link, file))

    # publish feeds
    if feeds:
        try:
            PuSH.publish(hub, feeds)
            for feed in feeds:
                log.info("Published %s to %s\n" % (feed, hub))
        except PuSH.PublishError, e:
            log.error("PubSubHubbub publishing error: %s\n" % e)