Better error handling of errors when a world fails to open.
A common case is a corrupt (or empty) level.dat file. This condition wasn't properly caught, yielding a less-than-useful stack trace. Even more concerning is that this could happen when a user is just running "overviewer.py" to get a world listing. This has been fixed to improve the user experience
This commit is contained in:
@@ -189,7 +189,7 @@ class NBTFileReader(object):
|
||||
payload = self._read_tag_compound()
|
||||
|
||||
return (name, payload)
|
||||
except (struct.error, ValueError), e:
|
||||
except (struct.error, ValueError, TypeError), e:
|
||||
raise CorruptNBTError("could not parse nbt: %s" % (str(e),))
|
||||
|
||||
# For reference, the MCR format is outlined at
|
||||
|
||||
Reference in New Issue
Block a user