mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
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:
parent
05a3d0435d
commit
92df3ce5ae
13 changed files with 86 additions and 1608 deletions
|
|
@ -93,6 +93,7 @@ class MonitorHandler(object):
|
|||
def at_update(self, obj, fieldname):
|
||||
"""
|
||||
Called by the field as it saves.
|
||||
|
||||
"""
|
||||
to_delete = []
|
||||
if obj in self.monitors and fieldname in self.monitors[obj]:
|
||||
|
|
@ -175,6 +176,9 @@ class MonitorHandler(object):
|
|||
"""
|
||||
List all monitors.
|
||||
|
||||
Returns:
|
||||
monitors (list): The handled monitors.
|
||||
|
||||
"""
|
||||
output = []
|
||||
for obj in self.monitors:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue