1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-24 08:45:13 +00:00

no Class(object) in py3

This commit is contained in:
Thomas Waldmann 2015-03-17 23:03:36 +01:00
parent 4ab4ecc7af
commit fec5572836
6 changed files with 11 additions and 11 deletions

View file

@ -10,7 +10,7 @@
from .hashindex import ChunkIndex
class Cache(object):
class Cache:
"""Client Side cache
"""
class RepositoryReplay(Error):

View file

@ -44,7 +44,7 @@ def key_factory(repository, manifest_data):
raise UnsupportedPayloadError(manifest_data[0])
class KeyBase(object):
class KeyBase:
def __init__(self):
self.TYPE_STR = bytes([self.TYPE])

View file

@ -23,7 +23,7 @@ class PathNotAllowed(Error):
"""Repository path not allowed"""
class RepositoryServer(object):
class RepositoryServer:
def __init__(self, restrict_to_paths):
self.repository = None
@ -78,7 +78,7 @@ def open(self, path, create=False):
return self.repository.id
class RemoteRepository(object):
class RemoteRepository:
extra_test_args = []
class RPCError(Exception):
@ -312,4 +312,4 @@ def get_many(self, keys):
def cache_if_remote(repository):
if isinstance(repository, RemoteRepository):
return RepositoryCache(repository)
return repository
return repository

View file

@ -19,7 +19,7 @@
TAG_COMMIT = 2
class Repository(object):
class Repository:
"""Filesystem based transactional key value store
On disk layout:
@ -378,7 +378,7 @@ def preload(self, ids):
"""
class LoggedIO(object):
class LoggedIO:
header_fmt = struct.Struct('<IIB')
assert header_fmt.size == 9

View file

@ -125,7 +125,7 @@ def test_read_only_lock_file(self):
lock.release()
class MockArchive(object):
class MockArchive:
def __init__(self, ts):
self.ts = ts

View file

@ -11,7 +11,7 @@
class KeyTestCase(AtticTestCase):
class MockArgs(object):
class MockArgs:
repository = Location(tempfile.mkstemp()[1])
keyfile2_key_file = """
@ -37,8 +37,8 @@ def setUp(self):
def tearDown(self):
shutil.rmtree(self.tmppath)
class MockRepository(object):
class _Location(object):
class MockRepository:
class _Location:
orig = '/some/place'
_location = _Location()