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

Fix #101 #102

Closed
wants to merge 1 commit into from
Closed
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
13 changes: 12 additions & 1 deletion src/rosdistro/rosdistro.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,18 @@ def _fetch_package_xml(self, rosdistro):
self._release_tags[rosdistro] = release_tag
return package_xml, release_tag
else:
raise Exception("Non-github repositories are net yet supported by the rosdistro tool")
release_tag = 'release/{0}/{1}/{2}'.format(rosdistro, self.name, repo.version)
url = repo.url
try:
# URL extension for GitLab/BitBucket repos
url = url.replace('.git', '/raw/{0}/package.xml'.format(release_tag))
package_xml = urlopen(url).read()
self._package_xmls[rosdistro] = package_xml
self._release_tags[rosdistro] = release_tag
return package_xml, release_tag
except Exception as e:
msg = "Failed to read package.xml file from url '{0}': {1}".format(url, e))
raise RuntimeError(msg)

def get_package_xml(self, rosdistro):
if rosdistro not in self._package_xmls:
Expand Down