Skip to content

Commit

Permalink
cosalib/build: drop get_artifact_meta() fname argument
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bgilbert committed May 3, 2021
1 parent d4451e8 commit dc43bb1
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/cosalib/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit dc43bb1

Please sign in to comment.