Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/__init__.py
Show All 9 Lines | |||||
logger = logging.getLogger(__name__) | logger = logging.getLogger(__name__) | ||||
try: | try: | ||||
__version__ = pkg_resources.get_distribution('swh.lister').version | __version__ = pkg_resources.get_distribution('swh.lister').version | ||||
except pkg_resources.DistributionNotFound: | except pkg_resources.DistributionNotFound: | ||||
__version__ = 'devel' | __version__ = 'devel' | ||||
USER_AGENT_TEMPLATE = 'Software Heritage Lister (%s)' | |||||
USER_AGENT = USER_AGENT_TEMPLATE % __version__ | |||||
LISTERS = {entry_point.name.split('.', 1)[1]: entry_point | LISTERS = {entry_point.name.split('.', 1)[1]: entry_point | ||||
for entry_point in pkg_resources.iter_entry_points('swh.workers') | for entry_point in pkg_resources.iter_entry_points('swh.workers') | ||||
if entry_point.name.split('.', 1)[0] == 'lister'} | if entry_point.name.split('.', 1)[0] == 'lister'} | ||||
SUPPORTED_LISTERS = list(LISTERS) | SUPPORTED_LISTERS = list(LISTERS) | ||||
Show All 24 Lines |