Skip to content

Commit dc43bb1

Browse files
committed
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.
1 parent d4451e8 commit dc43bb1

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/cosalib/build.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -446,20 +446,12 @@ def have_artifact(self):
446446
return True
447447
return False
448448

449-
def get_artifact_meta(self, fname=None):
450-
"""
451-
Get the artifact's metadata
452-
453-
:param fname: name of file to get metadata for
454-
:type fname: str
455-
"""
456-
if fname is None:
457-
fname = self.image_name
458-
fpath = os.path.join(self.build_dir, fname)
459-
log.info(f"Calculating metadata for {fname}")
449+
def get_artifact_meta(self):
450+
"""Get the artifact's metadata"""
451+
log.info(f"Calculating metadata for {self.image_name}")
460452
return {
461-
"path": fname,
462-
"sha256": sha256sum_file(fpath),
453+
"path": self.image_name,
454+
"sha256": sha256sum_file(self.image_path),
463455
"size": os.stat(self.image_path).st_size
464456
}
465457

0 commit comments

Comments
 (0)