From dc43bb125c07bfc8592cdbd1c678b336fcc200c9 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Fri, 30 Apr 2021 14:42:18 -0400 Subject: [PATCH] cosalib/build: drop get_artifact_meta() fname argument The method is inconsistent about when it uses self.image_path and when it uses a path calculated from the passed-in fname. Nothing is passing the argument, so just drop it. --- src/cosalib/build.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/cosalib/build.py b/src/cosalib/build.py index a442a290b6..4ae6348b82 100644 --- a/src/cosalib/build.py +++ b/src/cosalib/build.py @@ -446,20 +446,12 @@ def have_artifact(self): return True return False - def get_artifact_meta(self, fname=None): - """ - Get the artifact's metadata - - :param fname: name of file to get metadata for - :type fname: str - """ - if fname is None: - fname = self.image_name - fpath = os.path.join(self.build_dir, fname) - log.info(f"Calculating metadata for {fname}") + def get_artifact_meta(self): + """Get the artifact's metadata""" + log.info(f"Calculating metadata for {self.image_name}") return { - "path": fname, - "sha256": sha256sum_file(fpath), + "path": self.image_name, + "sha256": sha256sum_file(self.image_path), "size": os.stat(self.image_path).st_size }