You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
444 B

10 months ago
from __future__ import print_function
import json
from leapp.utils.repository import find_repository_basedir
from leapp.repository.scan import find_and_scan_repositories
base_dir = find_repository_basedir('.')
repository = find_and_scan_repositories(base_dir, include_locals=True)
repository.load()
if not hasattr(repository, 'repos'):
repository.repos = [repository]
print(json.dumps([repo.serialize() for repo in repository.repos]))