From 9a78fafcdbf690e052a453650580fd73e9baafaa Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 3 Sep 2017 18:44:37 -0500 Subject: [PATCH] Change name of MissingObject id to oid Signed-off-by: Rob Browning Tested-by: Rob Browning --- lib/bup/gc.py | 2 +- lib/bup/git.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bup/gc.py b/lib/bup/gc.py index 1926522..61300ec 100644 --- a/lib/bup/gc.py +++ b/lib/bup/gc.py @@ -225,7 +225,7 @@ def bup_gc(threshold=10, compression=1, verbosity=0): live_objects = find_live_objects(existing_count, cat_pipe, verbosity=verbosity) except MissingObject as ex: - log('bup: missing object %r \n' % ex.id.encode('hex')) + log('bup: missing object %r \n' % ex.oid.encode('hex')) sys.exit(1) try: # FIXME: just rename midxes and bloom, and restore them at the end if diff --git a/lib/bup/git.py b/lib/bup/git.py index 6787ac0..1275523 100644 --- a/lib/bup/git.py +++ b/lib/bup/git.py @@ -1258,9 +1258,9 @@ def tags(repo_dir = None): class MissingObject(KeyError): - def __init__(self, id): - self.id = id - KeyError.__init__(self, 'object %r is missing' % id.encode('hex')) + def __init__(self, oid): + self.oid = oid + KeyError.__init__(self, 'object %r is missing' % oid.encode('hex')) WalkItem = namedtuple('WalkItem', ['id', 'type', 'mode', -- 2.39.2