From d42ee45bb2b2aaa7f9b56cd26369b63f7e23a4a8 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 27 Mar 2023 19:46:48 +0000 Subject: [PATCH] Module puts to storage directly --- codearchiver/cli.py | 1 - codearchiver/modules/git.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/codearchiver/cli.py b/codearchiver/cli.py index ef471e6..1affcc8 100644 --- a/codearchiver/cli.py +++ b/codearchiver/cli.py @@ -197,7 +197,6 @@ def main(): os.chdir(td) try: result = module.process() - storage.put_result(result) finally: os.chdir('..') diff --git a/codearchiver/modules/git.py b/codearchiver/modules/git.py index f364896..e70e889 100644 --- a/codearchiver/modules/git.py +++ b/codearchiver/modules/git.py @@ -175,6 +175,9 @@ class Git(codearchiver.core.Module): for oid, otype in indexObjects.items(): metadata.append('Object', f'{oid} {otype}') + if self._storage: + self._storage.put(bundle, metadata) + return codearchiver.core.Result(id = self._id, files = [(bundle, metadata)]) def __repr__(self):