0

nbt: catch EOFError because of gzip streams

Might fix world listing for some corrupt worlds.

Fixes #1606.
This commit is contained in:
Nicolas F
2019-07-08 23:01:34 +02:00
parent a6bcc0f957
commit d92e61e559

View File

@@ -203,7 +203,7 @@ class NBTFileReader(object):
name = self._read_tag_string()
payload = self._read_tag_compound()
return (name, payload)
except (struct.error, ValueError, TypeError) as e:
except (struct.error, ValueError, TypeError, EOFError) as e:
raise CorruptNBTError("could not parse nbt: %s" % (str(e),))