summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-03-18 21:40:28 +0200
committerHugo <hugovk@users.noreply.github.com>2018-03-18 22:26:31 +0200
commit34cce402e23a21ba9c3fdf5cd7f27a85e65245c2 (patch)
treef8fdae1b81d2b86a43970c444b4bf0c0276da39b
parentac4f7d34f8752ab78949efcaa9f0bd938df33622 (diff)
downloadgitpython-34cce402e23a21ba9c3fdf5cd7f27a85e65245c2.tar.gz
Remove unnecessary list comprehension - 'any' can take a generator
-rw-r--r--git/remote.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/remote.py b/git/remote.py
index 947616dc..8aec68e1 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -542,7 +542,7 @@ class Remote(LazyMixin, Iterable):
if ' Push URL:' in line:
yield line.split(': ')[-1]
except GitCommandError as ex:
- if any([msg in str(ex) for msg in ['correct access rights', 'cannot run ssh']]):
+ if any(msg in str(ex) for msg in ['correct access rights', 'cannot run ssh']):
# If ssh is not setup to access this repository, see issue 694
result = Git().execute(
['git', 'config', '--get', 'remote.%s.url' % self.name]