Skip to content

Commit

Permalink
fix comments, pylint and ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Miryam-Schwartz committed Dec 19, 2024
1 parent f262323 commit 6cb2e29
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,6 @@ def extract_files(
]
for inner_tar_name in inner_tar_files:
with outer_tar.extractfile(inner_tar_name) as inner_tar_stream:
# Check if the inner stream can be read
try:
# Read some bytes to verify the file is not corrupted
inner_tar_stream.peek(1) # Peek at the first byte
except Exception as e:
log.LOGGER.info(
"Error reading inner tar file %s: %s", inner_tar_name, e
)
continue # Skip this file if it's invalid

inner_file_open_mode = (
"r:gz" if self.is_gzip_file_obj(inner_tar_stream) else "r:"
)
Expand Down

0 comments on commit 6cb2e29

Please sign in to comment.