Issue #15973: Fixed segmentation fault on timezone comparison to other types.

This commit is contained in:
Alexander Belopolsky 2012-09-20 16:39:33 -04:00
parent 4e12ad19c9
commit 3ec153681e
3 changed files with 11 additions and 3 deletions

View file

@ -1821,6 +1821,8 @@ class timezone(tzinfo):
return (self._offset, self._name)
def __eq__(self, other):
if type(other) != timezone:
return False
return self._offset == other._offset
def __hash__(self):