diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-06-08 11:24:10 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-06-08 11:24:10 +0200 |
commit | a5a75ab7533de99a4f569b05535061581cb07a41 (patch) | |
tree | f216ef134e43d33ca5d0be737546ef98b8abf731 /git/refs/symbolic.py | |
parent | b7071ce13476cae789377c280aa274e6242fd756 (diff) | |
download | gitpython-a5a75ab7533de99a4f569b05535061581cb07a41.tar.gz |
relaxed implementation when comparing symbolic references against other items which don't have a path. Fixed test_refs to work in all cases - it was previously dependent on the order of items returned by the file system
Diffstat (limited to 'git/refs/symbolic.py')
-rw-r--r-- | git/refs/symbolic.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 1c6a3bf1..65327a2f 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -46,7 +46,9 @@ class SymbolicReference(object): return '<git.%s "%s">' % (self.__class__.__name__, self.path) def __eq__(self, other): - return self.path == other.path + if hasattr(other, 'path'): + return self.path == other.path + return False def __ne__(self, other): return not ( self == other ) |