This file is indexed.

/usr/share/pyshared/paste/webkit/wkapplication.py is in python-pastewebkit 1.0-7build1.

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""
A mostly dummy class to simulate the Webware Application object.
"""

from wkcommon import NoDefault
import threading
try:
    from TaskKit.Scheduler import Scheduler
except ImportError:
    Scheduler = None

_taskManager = None
_makeTaskManagerLock = threading.Lock()

def taskManager():
    global _taskManager
    if _taskManager is None:
        if Scheduler is None:
            assert 0, (
                "FakeWebware is not installed, and/or TaskKit is "
                "not available")
        _makeTaskManagerLock.acquire()
        try:
            if _taskManager is None:
                _taskManager = Scheduler(1)
                _taskManager.start()
        finally:
            _makeTaskManagerLock.release()
    return _taskManager

class Application(object):

    def __init__(self, transaction):
        self._transaction = transaction

    def forward(self, trans, url, context=None):
        assert context is None, "Contexts are not supported"
        trans.forward(url)

    def setting(self, setting, default=NoDefault):
        assert default is not NoDefault, "No settings are defined"
        return default

    def taskManager(self):
        return taskManager()