Skip to content

Commit 44df831

Browse files
committed
resolve merge conflicts
1 parent 5116a6c commit 44df831

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sigmf/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ def get_schema(version=toolversion, schema_file=SCHEMA_META):
2323
TODO: In the future load specific schema versions.
2424
"""
2525
schema_dir = Path(__file__).parent
26-
with open(schema_dir / schema_file, 'rb') as handle:
26+
with open(schema_dir / schema_file, "rb") as handle:
2727
schema = json.load(handle)
2828
return schema

sigmf/sigmffile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,9 @@ def verify_stream_hashes(self) -> None:
837837
for stream in streams:
838838
old_hash = stream.get("hash")
839839
metafile_name = get_sigmf_filenames(stream.get("name"))["meta_fn"]
840-
if Path.is_file(metafile_name):
841-
new_hash = sigmf_hash.calculate_sha512(filename=metafile_name)
840+
metafile_path = self.base_path / metafile_name
841+
if Path.is_file(metafile_path):
842+
new_hash = sigmf_hash.calculate_sha512(filename=metafile_path)
842843
if old_hash != new_hash:
843844
raise SigMFFileError(
844845
f"Calculated file hash for {metafile_path} does not match collection metadata."
@@ -851,7 +852,8 @@ def set_streams(self, metafiles) -> None:
851852
self.metafiles = metafiles
852853
streams = []
853854
for metafile in self.metafiles:
854-
if metafile.endswith(".sigmf-meta") and Path.is_file(metafile):
855+
metafile_path = self.base_path / metafile
856+
if metafile.endswith(".sigmf-meta") and Path.is_file(metafile_path):
855857
stream = {
856858
# name must be string here to be serializable later
857859
"name": str(get_sigmf_filenames(metafile)["base_fn"]),

0 commit comments

Comments
 (0)