twoolie / NBT

Python Parser/Writer for the NBT file format, and it's container the RegionFile.
MIT License
362 stars 74 forks source link

If buffer is provided, don't close file. #131

Closed zacholade closed 2 years ago

zacholade commented 5 years ago

When parsing a buffer, the NBTFile class attempts to close the buffer once complete.. which isn't possible. This pull request fixes this issue and stops cases of AttributeError: 'EpicBytesIOClassNameHere' object has no attribute 'close'