Commits

Jason R. Coombs committed 61ae489

Fixed migration issue (it seems older versions of pymongo accepted the mixed format, but the latest 2.0.1 doesn't)

Comments (0)

Files changed (1)

pmxbot/logging.py

 		# store the original sqlite object ID in the
 		orig_id = message.pop('id')
 		orig_id_packed = struct.pack('L', orig_id)
-		oid_new = str(oid_time)[:4] + '\x00'*4 + orig_id_packed
+		oid_new = oid_time.binary[:4] + '\x00'*4 + orig_id_packed
 		oid = storage.pymongo.objectid.ObjectId(oid_new)
 		if not hasattr(Logger, 'log_id_map'): Logger.log_id_map = dict()
 		Logger.log_id_map[orig_id] = oid