Structure handlers to allow .get() to return lists

See #1154. In the end I didn't modify the Attributehandler and
TagHandler like this, instead I added the `return_list` argument
for cases when one wants a guaranteed return.
This commit is contained in:
Griatch 2017-08-27 14:56:05 +02:00
parent 05a3d0435d
commit 92df3ce5ae
13 changed files with 86 additions and 1608 deletions

View file

@ -107,7 +107,6 @@ from __future__ import print_function
from builtins import object
import re
import inspect
from django.conf import settings
from evennia.utils import logger, utils
from django.utils.translation import ugettext as _
@ -370,13 +369,13 @@ class LockHandler(object):
def all(self):
"""
Return all lockstrings.
Return all lockstrings
Returns:
lockstring (str): The full lockstring
lockstrings (list): All separate lockstrings
"""
return self.get()
return str(self).split(';')
def remove(self, access_type):
"""