Merge branch 'develop-py3' of https://github.com/vincent-lg/evennia into vincent-lg-develop-py3

This commit is contained in:
Griatch 2018-10-14 09:46:09 +02:00
commit f8084c0977

View file

@ -227,19 +227,19 @@ def _validate_prototype(prototype):
txt = protlib.prototype_to_str(prototype)
errors = "\n\n|g No validation errors found.|n (but errors could still happen at spawn-time)"
err = False
has_err = False
try:
# validate, don't spawn
spawner.spawn(prototype, only_validate=True)
except RuntimeError as err:
errors = "\n\n|r{}|n".format(err)
err = True
has_err = True
except RuntimeWarning as err:
errors = "\n\n|y{}|n".format(err)
err = True
has_err = True
text = (txt + errors)
return err, text
return has_err, text
def _format_protfuncs():