Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _dump_extensions(cls, prefix="iotile."):
extensions = {}
for config, distro in entrypoints.iter_files_distros():
if distro is None:
distro_info = None
else:
distro_info = (distro.name, distro.version)
for group in config:
if prefix is not None and not group.startswith(prefix):
continue
if group not in extensions:
extensions[group] = []
for name, epstr in config[group].items():
extensions[group].append(dict(name=name, object=epstr, distribution=distro_info))
return extensions