plistlib: remove HACK that does not pass python 3

This commit is contained in:
Adrien Tétar 2014-09-20 19:50:37 +02:00 committed by Denis Jacquerye
parent 337ef3202b
commit 1602f21e58

View File

@ -475,21 +475,3 @@ class PlistParser:
self.addObject(Data.fromBase64(self.getData()))
def end_date(self):
self.addObject(_dateFromString(self.getData()))
# cruft to support booleans in Python <= 2.3
import sys
if sys.version_info[:2] < (2, 3):
# Python 2.2 and earlier: no booleans
# Python 2.2.x: booleans are ints
class bool(int):
"""Imitation of the Python 2.3 bool object."""
def __new__(cls, value):
return int.__new__(cls, not not value)
def __repr__(self):
if self:
return "True"
else:
return "False"
True = bool(1)
False = bool(0)