Guest User

zodb: go from undo id to TID

a guest
Sep 17th, 2014
214
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data