Commit 5680bb29 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Use our own u64() to avoid imports from ZODB.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@630 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f848eaa9
......@@ -20,8 +20,7 @@ import logging
from neo.protocol import UP_TO_DATE_STATE, OUT_OF_DATE_STATE, FEEDING_STATE, \
DISCARDED_STATE, RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, \
BROKEN_STATE, VALID_CELL_STATE_LIST, HIDDEN_STATE
from ZODB.utils import u64
from neo.util import dump
from neo.util import dump, u64
class Cell(object):
"""This class represents a cell in a partition table."""
......
......@@ -17,6 +17,13 @@
from zlib import adler32
from struct import pack, unpack
def u64(s):
return unpack('!Q', s)[0]
def p64(n):
return pack('!Q', n)
def dump(s):
"""Dump a binary string in hex."""
......
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