Skip to content

Commit

Permalink
read_ndc() now logs ndc filetype.
Browse files Browse the repository at this point in the history
  • Loading branch information
d-cogswell committed Aug 2, 2024
1 parent ffd7f0e commit e6ada27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions NewareNDA/NewareNDAx.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,10 @@ def read_ndc(file):
with open(file, 'rb') as f:
mm = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)

# Get ndc file version
# Get ndc file version and filetype
[ndc_filetype] = struct.unpack('<B', mm[0:1])
[ndc_version] = struct.unpack('<B', mm[2:3])
logger.info(f"NDC version: {ndc_version}")
logger.info(f"NDC version: {ndc_version} filetype: {ndc_filetype}")

if ndc_version == 2:
return _read_ndc_2(mm)
Expand Down

0 comments on commit e6ada27

Please sign in to comment.