world: Don't call sys.exit here, raise something
A world being unsupported may not be a fatal application error in all instances where this codepath in world.py is used, hence throwing an exception is more sensible.
This commit is contained in:
@@ -470,6 +470,10 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
|
||||
except CorruptNBTError, e:
|
||||
logging.error("Failed to open world %r", render['world'])
|
||||
raise e
|
||||
except world.UnsupportedVersion, e:
|
||||
for ln in str(e).split('\n'):
|
||||
logging.error(ln)
|
||||
sys.exit(1)
|
||||
|
||||
worldcache[render['world']] = w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user