Permalink
Browse files

Work around OSX 10.8 Python 2.5 bug PYTHON-389

See PYTHON-389 for more details.
  • Loading branch information...
1 parent 036a3b1 commit d79c438d5dbb79284cdcfe5977dc7eefa0e97e2c @behackett behackett committed Aug 9, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 bson/timestamp.py
View
@@ -20,6 +20,7 @@
from bson.tz_util import utc
+UPPERBOUND = 4294967296
class Timestamp(object):
"""MongoDB internal timestamps used in the opLog.
@@ -54,9 +55,9 @@ def __init__(self, time, inc):
raise TypeError("time must be an instance of int")
if not isinstance(inc, (int, long)):
raise TypeError("inc must be an instance of int")
- if not 0 <= time < 2 ** 32:
+ if not 0 <= time < UPPERBOUND:
raise ValueError("time must be contained in [0, 2**32)")
- if not 0 <= inc < 2 ** 32:
+ if not 0 <= inc < UPPERBOUND:
raise ValueError("inc must be contained in [0, 2**32)")
self.__time = time

0 comments on commit d79c438

Please sign in to comment.