summaryrefslogtreecommitdiffstats
path: root/Lib/datetime.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-09-20 20:39:33 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-09-20 20:39:33 (GMT)
commit3ec153681e4e5553fc6882699beb5af6d45c75e6 (patch)
tree3c17886d2e7636effa0d7d4b9c7a3b2d1361b61c /Lib/datetime.py
parent4e12ad19c984dc8dfdb8c326b0ea44c490408579 (diff)
downloadcpython-3ec153681e4e5553fc6882699beb5af6d45c75e6.zip
cpython-3ec153681e4e5553fc6882699beb5af6d45c75e6.tar.gz
cpython-3ec153681e4e5553fc6882699beb5af6d45c75e6.tar.bz2
Issue #15973: Fixed segmentation fault on timezone comparison to other types.
Diffstat (limited to 'Lib/datetime.py')
-rw-r--r--Lib/datetime.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/datetime.py b/Lib/datetime.py
index 65f95d2..bf23e50 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -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):