urljoin GUN together instead of manually concatenating

This commit is contained in:
Evan Cordell 2017-04-12 14:30:22 -04:00
parent 68128b938b
commit 70ae34357f

View file

@ -84,7 +84,7 @@ class TUFMetadataAPI(object):
Args:
namespace: namespace containing the repository
repository: the repo to get tags for
repository: the repo to delete metadata for
Returns:
True if successful, False otherwise
@ -107,7 +107,7 @@ class TUFMetadataAPI(object):
return True
def _gun(self, namespace, repository):
return "%s/%s/%s" % (self._gun_prefix, namespace, repository)
return urljoin(self._gun_prefix, namespace, repository)
def _parse_signed(self, json_response):
""" Attempts to parse the targets from a metadata response """