From 74b13c58345d7a8225bbffdfe4d845bb1e703692 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 8 Jun 2011 11:27:47 +0200 Subject: symbolic reference handles different types for comparison more gracefully. Fixed possible issue in test_refs, which occurred in 0.3 previously --- git/refs/symbolic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git/refs') diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 8c3689b4..ec31f30c 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -64,7 +64,9 @@ class SymbolicReference(object): return '' % (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 ) -- cgit v1.2.3