From: Daira Hopwood Date: Sat, 26 Apr 2014 20:25:28 +0000 (+0100) Subject: Add Namespace class. X-Git-Url: https://git.rkrishnan.org/cyclelanguage?a=commitdiff_plain;h=a78551df8ff53670a851cbad6f73b43e180e0790;p=tahoe-lafs%2Ftahoe-lafs.git Add Namespace class. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/storage/backends/cloud/mutable.py b/src/allmydata/storage/backends/cloud/mutable.py index 7c9a2ead..1b2ae8f7 100644 --- a/src/allmydata/storage/backends/cloud/mutable.py +++ b/src/allmydata/storage/backends/cloud/mutable.py @@ -10,6 +10,7 @@ from zope.interface import implements from allmydata.interfaces import IMutableShare, BadWriteEnablerError from allmydata.util import idlib, log from allmydata.util.assertutil import precondition, _assert +from allmydata.util.namespace import Namespace from allmydata.util.mathutil import div_ceil from allmydata.util.hashutil import timing_safe_compare from allmydata.storage.common import CorruptStoredShareError, UnknownMutableContainerVersionError, \ @@ -42,10 +43,6 @@ assert struct.calcsize(">L") == 4, struct.calcsize(">L") assert struct.calcsize(">Q") == 8, struct.calcsize(">Q") -class Namespace(object): - pass - - class MutableCloudShare(CloudShareBase, CloudShareReaderMixin): implements(IMutableShare) diff --git a/src/allmydata/test/test_iputil.py b/src/allmydata/test/test_iputil.py index 71a8752a..ee1fd418 100644 --- a/src/allmydata/test/test_iputil.py +++ b/src/allmydata/test/test_iputil.py @@ -4,6 +4,7 @@ import re, errno, subprocess, os from twisted.trial import unittest from allmydata.util import iputil +from allmydata.util.namespace import Namespace import allmydata.test.common_util as testutil from allmydata.util.namespace import Namespace diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index 46a9933e..d648ffe3 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -20,6 +20,7 @@ from foolscap.logging.web import LogEvent from allmydata import interfaces from allmydata.util.assertutil import precondition +from allmydata.util.namespace import Namespace from allmydata.util import fileutil, hashutil, base32, time_format from allmydata.storage.server import StorageServer from allmydata.storage.backends.base import ContainerItem, ContainerListing @@ -1537,10 +1538,6 @@ class MSAzureStorageBackendTests(unittest.TestCase, CloudStorageBackendMixin): self.failUnless(done) -class Namespace(object): - pass - - class AdminContainerTests(unittest.TestCase, WorkdirMixin): def test_admin_create_container(self): # We'll use the mock cloud backend to test this.