Commit 8dfbff49 authored by Tres Seaver's avatar Tres Seaver

Don't use repr(tid) to get a serial.

repr() must return text, and we need bytes.
parent d352bdc1
...@@ -98,7 +98,7 @@ class BaseStorage(UndoLogCompatible): ...@@ -98,7 +98,7 @@ class BaseStorage(UndoLogCompatible):
t = time.time() t = time.time()
t = self._ts = TimeStamp(*(time.gmtime(t)[:5] + (t%60,))) 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 # ._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 # a reserved oid for the root object). Our new_oid() method
...@@ -247,7 +247,7 @@ class BaseStorage(UndoLogCompatible): ...@@ -247,7 +247,7 @@ class BaseStorage(UndoLogCompatible):
now = time.time() now = time.time()
t = TimeStamp(*(time.gmtime(now)[:5] + (now % 60,))) t = TimeStamp(*(time.gmtime(now)[:5] + (now % 60,)))
self._ts = t = t.laterThan(self._ts) self._ts = t = t.laterThan(self._ts)
self._tid = repr(t) self._tid = t.raw()
else: else:
self._ts = TimeStamp(tid) self._ts = TimeStamp(tid)
self._tid = tid self._tid = tid
......
...@@ -117,7 +117,7 @@ def newTid(old): ...@@ -117,7 +117,7 @@ def newTid(old):
ts = TimeStamp(*time.gmtime(t)[:5]+(t%60,)) ts = TimeStamp(*time.gmtime(t)[:5]+(t%60,))
if old is not None: if old is not None:
ts = ts.laterThan(TimeStamp(old)) ts = ts.laterThan(TimeStamp(old))
return `ts` return ts.raw()
def oid_repr(oid): def oid_repr(oid):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment