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:
parent
4ab4ecc7af
commit
fec5572836
6 changed files with 11 additions and 11 deletions
|
@ -10,7 +10,7 @@
|
|||
from .hashindex import ChunkIndex
|
||||
|
||||
|
||||
class Cache(object):
|
||||
class Cache:
|
||||
"""Client Side cache
|
||||
"""
|
||||
class RepositoryReplay(Error):
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue