raise a more descriptive error when cannot import infdev

This commit is contained in:
David Vierra 2010-09-28 16:03:40 -10:00
parent 18e3b38aed
commit e5a966596c

View File

@ -664,10 +664,13 @@ class MCLevel:
info( "Detected INVEdit inventory file" )
return INVEditChest(root_tag=root_tag, filename=filename);
if ("Data" in root_tag and loadInfinite):
if ("Data" in root_tag):
info( "Detected Infdev level.dat" )
if (loadInfinite):
return MCInfdevOldLevel(root_tag=root_tag, filename=filename);
return MCInfdevOldLevel(root_tag=root_tag, filename=filename);
else:
raise IOError, "Cannot import infinite levels"
raise IOError, "Cannot detect file type."