mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 14:07:16 +02:00
Merge branch 'develop-py3' of https://github.com/vincent-lg/evennia into vincent-lg-develop-py3
This commit is contained in:
commit
f8084c0977
1 changed files with 4 additions and 4 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue