mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 12:07:17 +02:00
Fixed a regression in the changes made to all_from_module that caused evform to fail.
This commit is contained in:
parent
83e24678f5
commit
323a353ec3
1 changed files with 3 additions and 2 deletions
|
|
@ -975,8 +975,9 @@ def all_from_module(module):
|
|||
mod = mod_import(module)
|
||||
if not mod:
|
||||
return {}
|
||||
# make sure to only return variables actually defined in this module (not imports)
|
||||
members = getmembers(mod, predicate=lambda obj: getmodule(obj) == mod)
|
||||
# make sure to only return variables actually defined in this
|
||||
# module if available (try to avoid not imports)
|
||||
members = getmembers(mod, predicate=lambda obj: getmodule(obj) in (mod, None))
|
||||
return dict((key, val) for key, val in members if not key.startswith("_"))
|
||||
#return dict((key, val) for key, val in mod.__dict__.items()
|
||||
# if not (key.startswith("_") or ismodule(val)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue