Advertisement
Guest User

zodb: go from undo id to TID

a guest
Sep 17th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. >>> conndb.undoInfo()[17]
  2. {'description': '/www/fg_base_view_p3', 'size': 56700, 'user_name': ' None', 'id': 'A6kMYt2AfSI=', 'time': 1408675371.9145098}
  3. # now it's time to transfor the undo id to a TID
  4. >>> import base64
  5. >>> base64.decodestring('A6kMYt2AfSI=' + '\n')
  6. '\x03\xa9\x0cb\xdd\x80}"'
  7. >>> u64(base64.decodestring('A6kMYt2AfSI=' + '\n'))
  8. 263755671940398370
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement