commit | 3ec153681e4e5553fc6882699beb5af6d45c75e6 | [log] [tgz] |
---|---|---|
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Thu Sep 20 16:39:33 2012 -0400 |
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Thu Sep 20 16:39:33 2012 -0400 |
tree | 3c17886d2e7636effa0d7d4b9c7a3b2d1361b61c | |
parent | 4e12ad19c984dc8dfdb8c326b0ea44c490408579 [diff] [blame] |
Issue #15973: Fixed segmentation fault on timezone comparison to other types.
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 @@ return (self._offset, self._name) def __eq__(self, other): + if type(other) != timezone: + return False return self._offset == other._offset def __hash__(self):