mutable WIP: split mutable.py into separate files. All tests pass.

This commit is contained in:
Brian Warner
2008-04-11 14:31:16 -07:00
parent 0515b1099c
commit d4230d1781
13 changed files with 2586 additions and 71 deletions

View File

@ -4,7 +4,8 @@ import os, time
from zope.interface import implements
from twisted.internet import defer
import simplejson
from allmydata.mutable import NotMutableError
from allmydata.mutable.common import NotMutableError
from allmydata.mutable.node import MutableFileNode
from allmydata.interfaces import IMutableFileNode, IDirectoryNode,\
IURI, IFileNode, IMutableFileURI, IVerifierURI, IFilesystemNode
from allmydata.util import hashutil
@ -12,8 +13,6 @@ from allmydata.util.hashutil import netstring
from allmydata.uri import NewDirectoryURI
from pycryptopp.cipher.aes import AES
from allmydata.mutable import MutableFileNode
def split_netstring(data, numstrings, allow_leftover=False):
"""like string.split(), but extracts netstrings. If allow_leftover=False,
returns numstrings elements, and throws ValueError if there was leftover