[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/ Don't use repr(tid) to get a serial.
Tres Seaver
cvs-admin at zope.org
Sat Dec 15 01:29:14 UTC 2012
Log message for revision 128675:
Don't use repr(tid) to get a serial.
repr() must return text, and we need bytes.
Changed:
U ZODB/trunk/src/ZODB/BaseStorage.py
U ZODB/trunk/src/ZODB/utils.py
-=-
Modified: ZODB/trunk/src/ZODB/BaseStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/BaseStorage.py 2012-12-14 23:48:58 UTC (rev 128674)
+++ ZODB/trunk/src/ZODB/BaseStorage.py 2012-12-15 01:29:13 UTC (rev 128675)
@@ -98,7 +98,7 @@
t = time.time()
t = self._ts = TimeStamp(*(time.gmtime(t)[:5] + (t%60,)))
- self._tid = repr(t)
+ self._tid = t.raw()
# ._oid is the highest oid in use (0 is always in use -- it's
# a reserved oid for the root object). Our new_oid() method
@@ -247,7 +247,7 @@
now = time.time()
t = TimeStamp(*(time.gmtime(now)[:5] + (now % 60,)))
self._ts = t = t.laterThan(self._ts)
- self._tid = repr(t)
+ self._tid = t.raw()
else:
self._ts = TimeStamp(tid)
self._tid = tid
Modified: ZODB/trunk/src/ZODB/utils.py
===================================================================
--- ZODB/trunk/src/ZODB/utils.py 2012-12-14 23:48:58 UTC (rev 128674)
+++ ZODB/trunk/src/ZODB/utils.py 2012-12-15 01:29:13 UTC (rev 128675)
@@ -117,7 +117,7 @@
ts = TimeStamp(*time.gmtime(t)[:5]+(t%60,))
if old is not None:
ts = ts.laterThan(TimeStamp(old))
- return `ts`
+ return ts.raw()
def oid_repr(oid):
More information about the Zodb-checkins
mailing list