Use to_str/to_bytes, replacing old versions

This commit is contained in:
Griatch 2019-01-16 23:26:46 +01:00
commit c3ebd8d251
24 changed files with 130 additions and 121 deletions

View file

@ -1039,7 +1039,7 @@ def node_aliases(caller):
def _caller_attrs(caller):
prototype = _get_menu_prototype(caller)
attrs = ["{}={}".format(tup[0], utils.crop(utils.to_str(tup[1], force_string=True), width=10))
attrs = ["{}={}".format(tup[0], utils.crop(utils.to_str(tup[1]), width=10))
for tup in prototype.get("attrs", [])]
return attrs

View file

@ -569,7 +569,7 @@ def protfunc_parser(value, available_functions=None, testing=False, stacktrace=F
value = value.dbref
except AttributeError:
pass
value = to_str(value, force_string=True)
value = to_str(value)
available_functions = PROT_FUNCS if available_functions is None else available_functions