Removed deprecated non-nested {inlinefuncs, only accepting (). Changed the default name of the mygame/server/conf/inlinefunc.py to mygame/server/conf/inlinefuncs.py. Added deprecationwarning for the old name.
This commit is contained in:
parent
b00e357868
commit
644cf9451f
7 changed files with 27 additions and 286 deletions
|
|
@ -805,6 +805,11 @@ def error_check_python_modules():
|
|||
imp(settings.BASE_ROOM_TYPECLASS)
|
||||
imp(settings.BASE_EXIT_TYPECLASS)
|
||||
imp(settings.BASE_SCRIPT_TYPECLASS)
|
||||
# changed game dir settings file names
|
||||
if os.path.isfile(os.path.join("server", "conf", "inlinefunc.py")):
|
||||
raise DeprecationWarning("Name change: mygame/server/conf/inlinefunc.py should "
|
||||
"be renamed to mygame/server/conf/inlinefuncs.py (note the S at the end)")
|
||||
|
||||
|
||||
|
||||
def init_game_directory(path, check_db=True):
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ from evennia.utils.utils import (variable_from_module, is_iter,
|
|||
to_str, to_unicode,
|
||||
make_iter,
|
||||
callables_from_module)
|
||||
from evennia.utils.inlinefunc import parse_inlinefunc
|
||||
from evennia.utils.nested_inlinefuncs import parse_inlinefunc as parse_nested_inlinefunc
|
||||
from evennia.utils.inlinefuncs import parse_inlinefunc
|
||||
|
||||
try:
|
||||
import cPickle as pickle
|
||||
|
|
@ -174,8 +173,7 @@ class SessionHandler(dict):
|
|||
session.protocol_flags["ENCODING"] = "utf-8"
|
||||
data = to_str(to_unicode(data), encoding=session.protocol_flags["ENCODING"])
|
||||
if _INLINEFUNC_ENABLED and not raw:
|
||||
data = parse_inlinefunc(data, strip=strip_inlinefunc, session=session) # deprecated!
|
||||
data = parse_nested_inlinefunc(data, strip=strip_inlinefunc, session=session)
|
||||
data = parse_inlinefunc(data, strip=strip_inlinefunc, session=session)
|
||||
return data
|
||||
elif hasattr(data, "id") and hasattr(data, "db_date_created") \
|
||||
and hasattr(data, '__dbclass__'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue