Skip to content

Commit

Permalink
MyPy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrink10 committed Dec 31, 2019
1 parent 2d017a3 commit 5bf101c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/basilisp/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,23 @@ def _get_basilisp_bytecode(
f"expected {MAGIC_NUMBER!r}"
)
logger.debug(message)
raise ImportError(message, **exc_details) # type: ignore
raise ImportError(message, **exc_details)
elif len(raw_timestamp) != 4:
message = f"Reached EOF while reading timestamp in {fullname}"
logger.debug(message)
raise EOFError(message)
elif _r_long(raw_timestamp) != mtime:
message = f"Non-matching timestamp ({_r_long(raw_timestamp)}) in {fullname} bytecode cache; expected {mtime}"
logger.debug(message)
raise ImportError(message, **exc_details) # type: ignore
raise ImportError(message, **exc_details)
elif len(raw_size) != 4:
message = f"Reached EOF while reading size of source in {fullname}"
logger.debug(message)
raise EOFError(message)
elif _r_long(raw_size) != source_size:
message = f"Non-matching filesize ({_r_long(raw_size)}) in {fullname} bytecode cache; expected {source_size}"
logger.debug(message)
raise ImportError(message, **exc_details) # type: ignore
raise ImportError(message, **exc_details)

return marshal.loads(cache_data[12:])

Expand Down

0 comments on commit 5bf101c

Please sign in to comment.