We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47e15f9 commit f228bd7Copy full SHA for f228bd7
sc2reader/utils.py
@@ -460,10 +460,13 @@ def extract_data_file(data_file, archive):
460
try:
461
file_data = archive.read_file(data_file, force_decompress=True)
462
except Exception as e:
463
- if str(e) in ("string index out of range", "Unsupported compression type."):
+ # If it doesn't work with forced decompression, try again without it
464
+ exc_info = sys.exc_info()
465
+ try:
466
file_data = archive.read_file(data_file, force_decompress=False)
- else:
- raise
467
+ except Exception:
468
+ # raise the original exception
469
+ raise exc_info[1], None, exc_info[2]
470
else:
471
file_data = archive.read_file(data_file)
472
0 commit comments