summaryrefslogtreecommitdiff
path: root/git/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/util.py')
-rw-r--r--git/util.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/git/util.py b/git/util.py
index 3ba58857..7ca0564e 100644
--- a/git/util.py
+++ b/git/util.py
@@ -864,9 +864,12 @@ class IterableList(list):
def __contains__(self, attr):
# first try identity match for performance
- rval = list.__contains__(self, attr)
- if rval:
- return rval
+ try:
+ rval = list.__contains__(self, attr)
+ if rval:
+ return rval
+ except (AttributeError, TypeError):
+ pass
# END handle match
# otherwise make a full name search