Skip to content

Commit 86ef997

Browse files
liambeguinTeque5
authored andcommitted
sigmffile: propagate skip_checksum when opening archives
Propagate skip_checksum down when opening a sigmf archive just as it's done for other formats. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
1 parent e40429b commit 86ef997

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sigmf/sigmffile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,14 +927,14 @@ def get_dataset_filename_from_metadata(meta_fn, metadata=None):
927927
return None
928928

929929

930-
def fromarchive(archive_path, dir=None):
930+
def fromarchive(archive_path, dir=None, skip_checksum=False):
931931
"""Extract an archive and return a SigMFFile.
932932
933933
The `dir` parameter is no longer used as this function has been changed to
934934
access SigMF archives without extracting them.
935935
"""
936936
from .archivereader import SigMFArchiveReader
937-
return SigMFArchiveReader(archive_path).sigmffile
937+
return SigMFArchiveReader(archive_path, skip_checksum=skip_checksum).sigmffile
938938

939939

940940
def fromfile(filename, skip_checksum=False):
@@ -965,7 +965,7 @@ def fromfile(filename, skip_checksum=False):
965965
file_path, ext = path.splitext(filename) # works with Pathlib - ext contains a dot
966966

967967
if (ext.lower().endswith(SIGMF_ARCHIVE_EXT) or not path.isfile(meta_fn)) and path.isfile(archive_fn):
968-
return fromarchive(archive_fn)
968+
return fromarchive(archive_fn, skip_checksum=skip_checksum)
969969

970970
if (ext.lower().endswith(SIGMF_COLLECTION_EXT) or not path.isfile(meta_fn)) and path.isfile(collection_fn):
971971
collection_fp = open(collection_fn, "rb")

0 commit comments

Comments
 (0)