From 7ac7638c1bdca70cfb83d1b958efc5403222c853 Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Tue, 1 Mar 2022 14:45:29 +0100 Subject: Bug fix for repos without a remote Use splitlines() instead of split('\n') to list remote for each repo. Change-Id: Ia8d5c7f53c457fa1cbf99c543cd14fc845279017 --- fetch_externals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch_externals.py b/fetch_externals.py index 8121808..0be9cc3 100755 --- a/fetch_externals.py +++ b/fetch_externals.py @@ -115,7 +115,7 @@ class Git(object): def __get_remotes(self): remotes = {} - for remote in check_output(['git', 'remote'], cwd=self.absolutepath).decode('utf-8').strip().split('\n'): + for remote in check_output(['git', 'remote'], cwd=self.absolutepath).decode('utf-8').splitlines(): fetch = check_output(['git', 'remote', 'get-url', remote], cwd=self.absolutepath).decode('utf-8').strip() push = check_output(['git', 'remote', 'get-url', '--push', remote], cwd=self.absolutepath).decode('utf-8').strip() remotes[remote] = { 'fetch': fetch, 'push': push } -- cgit v1.2.1