From 3f4b410c955ea08bfb7842320afa568090242679 Mon Sep 17 00:00:00 2001 From: Guyzmo Date: Wed, 8 Jun 2016 19:45:35 +0200 Subject: Switching the `urls` property to use `git remote show` instead of `git remote get-url` `get-url` is a new API that is not widely available yet (introduced in git 2.7.0), and provokes failure on travis. Signed-off-by: Guyzmo --- git/remote.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git/remote.py b/git/remote.py index ef02c629..5e9fe2c0 100644 --- a/git/remote.py +++ b/git/remote.py @@ -477,10 +477,10 @@ class Remote(LazyMixin, Iterable): def urls(self): """:return: Iterator yielding all configured URL targets on a remote as strings""" - scmd = 'get-url' - kwargs = {'insert_kwargs_after': scmd} - for url in self.repo.git.remote(scmd, self.name, all=True, **kwargs).split('\n'): - yield url + remote_details = self.repo.git.remote("show", self.name) + for line in remote_details.split('\n'): + if ' Push URL:' in line: + yield line.split(': ')[-1] @property def refs(self): -- cgit v1.2.1