diff options
author | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2022-03-01 14:45:29 +0100 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2022-03-01 14:47:06 +0100 |
commit | 7ac7638c1bdca70cfb83d1b958efc5403222c853 (patch) | |
tree | 90e0b449e667239109265c071c0f726165196776 | |
parent | e5eadc401ba1dd791c7b86be0ab311d37e6f848d (diff) | |
download | ethos-u-7ac7638c1bdca70cfb83d1b958efc5403222c853.tar.gz |
Bug fix for repos without a remote22.02
Use splitlines() instead of split('\n') to list remote for each repo.
Change-Id: Ia8d5c7f53c457fa1cbf99c543cd14fc845279017
-rwxr-xr-x | fetch_externals.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |