This file is indexed.

/usr/share/pyshared/grokcore/component/tests/event/errorconditions.py is in python-grokcore.component 2.5-0ubuntu1.

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
"""
@grok.subscribe can only be used on module level:

  >>> function_context()
  Traceback (most recent call last):
    ...
  GrokImportError: @grok.subscribe can only be used on module level.
  
  >>> class_context()
  Traceback (most recent call last):
    ...
  GrokImportError: @grok.subscribe can only be used on module level.


@grok.subscribe can not be called without arguments:

  >>> import grokcore.component.tests.event.errorconditions_fixture
  Traceback (most recent call last):
    ...
  GrokImportError: @grok.subscribe requires at least one argument.
  
"""
import grokcore.component as grok
from zope.component.interfaces import IObjectEvent

def function_context():
    @grok.subscribe(grok.Context, IObjectEvent)
    def subscriber():
        pass
    
def class_context():
    class Wrapper:
        @grok.subscribe(grok.Context, IObjectEvent)
        def subscriber(self):
            pass