]> arthur.barton.de Git - bup.git/commitdiff
Revert new-style classes
authorGabriel Filion <lelutin@gmail.com>
Mon, 11 Oct 2010 18:30:51 +0000 (14:30 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 9 Nov 2010 05:00:17 +0000 (21:00 -0800)
Some classes were changed to "new-style" Python classes in c7a0f06.

Following a discussion on the mailing list about the relevance of such a
change, it was noted that the features that new-style classes bring are
not used in bup, and considering their slightly higher cost in
instantiating them and accessing their attributes, it is decided that we
don't change to using them.

Revert the changed clases back to old-style classes so that all code is
consistent.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
lib/bup/vfs.py

index 00707ce56a447416a06ffaa5cf4120922b9626ab..891e9117afab33ab8c1a6c4016b9adcf5dc918a8 100644 (file)
@@ -96,7 +96,7 @@ def _chunkiter(hash, startofs):
             yield ''.join(cp().join(sha.encode('hex')))[skipmore:]
 
 
-class _ChunkReader(object):
+class _ChunkReader:
     def __init__(self, hash, isdir, startofs):
         if isdir:
             self.it = _chunkiter(hash, startofs)
@@ -161,7 +161,7 @@ class _FileReader(object):
         pass
 
 
-class Node(object):
+class Node:
     """Base class for file representation."""
     def __init__(self, parent, name, mode, hash):
         self.parent = parent