Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a 'python_version' key to each distribution in the index.yaml #145

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/rosdistro/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ def __init__(self, data, base_url, url_query=''):
self.distributions[distro_name] = {}
distro_data = data['distributions'][distro_name]
for key in distro_data:
if key in ('distribution_status', 'distribution_type'):
if key in ('distribution_status', 'distribution_type', 'python_version'):
assert self.version >= 4, "'%s' format version '%d' does not allow a '%s' entry" % (Index._type, self.version, key)
assert isinstance(distro_data[key], str), 'wrong type of key "%s"' % key
if key == 'python_version':
assert isinstance(distro_data[key], int), 'wrong type of key "%s"' % key
else:
assert isinstance(distro_data[key], str), 'wrong type of key "%s"' % key
self.distributions[distro_name][key] = distro_data[key]
continue

Expand Down