This file is indexed.

/usr/lib/python2.7/dist-packages/aws_xray_sdk/core/plugins/utils.py is in python-aws-xray-sdk 0.95-1.

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
import importlib
from ..exceptions.exceptions import MissingPluginNames

module_prefix = 'aws_xray_sdk.core.plugins.'

PLUGIN_MAPPING = {
    'elasticbeanstalkplugin': 'elasticbeanstalk_plugin',
    'ec2plugin': 'ec2_plugin',
    'ecsplugin': 'ecs_plugin'
}


def get_plugin_modules(plugins):
    """
    Get plugin modules from input strings
    :param tuple plugins: a tuple of plugin names in str
    """
    if not plugins:
        raise MissingPluginNames("input plugin names are required")

    modules = []

    for plugin in plugins:
        short_name = PLUGIN_MAPPING.get(plugin.lower(), plugin.lower())
        full_path = '%s%s' % (module_prefix, short_name)
        modules.append(importlib.import_module(full_path))

    return tuple(modules)