Skip to content

Commit

Permalink
Add extra exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
crass committed May 10, 2024
1 parent 2ffe502 commit 07db9d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,11 @@ def parse_apk_data_backup(self, pkg_name, pkg_metadata, key, salt):
scipher = self.get_cipher(f, key, adbuf)

with scipher as dec_stream:
bytes_read = dec_stream.read()
try:
bytes_read = dec_stream.read()
except Exception as e:
logger.error(f" Error: Failure to decrypt {os.path.basename(pkg_path).decode()}: {e}")
return
output_file.write(bytes_read)

output_file.seek(0)
Expand Down

0 comments on commit 07db9d8

Please sign in to comment.