diff --git a/AUTHORS b/AUTHORS index 5f42f8565..a0aa707c7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -32,5 +32,6 @@ Contributors are: -A. Jesse Jiryu Davis -Steven Whitman -Stefan Stancu +-César Izurieta Portions derived from other open source works and are clearly marked. diff --git a/git/util.py b/git/util.py index 3ba588577..7ca0564eb 100644 --- a/git/util.py +++ b/git/util.py @@ -864,9 +864,12 @@ def __init__(self, id_attr, prefix=''): 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