Fixed a bug in examine. Gave a more informative error message from asynchronous reload.
This commit is contained in:
parent
2f78bacd97
commit
7600892d5d
2 changed files with 4 additions and 4 deletions
|
|
@ -1363,17 +1363,17 @@ class CmdExamine(ObjManipCommand):
|
|||
non-persistent data stored on object
|
||||
"""
|
||||
if attrname:
|
||||
db_attr = [obj.attr(attrname)]
|
||||
db_attr = [(attrname, obj.attr(attrname))]
|
||||
try:
|
||||
ndb_attr = [(attrname, object.__getattribute__(obj.ndb, attrname))]
|
||||
except Exception:
|
||||
ndb_attr = [(attrname, None)]
|
||||
ndb_attr = None
|
||||
else:
|
||||
db_attr = [(attr.key, attr.value) for attr in ObjAttribute.objects.filter(db_obj=obj)]
|
||||
try:
|
||||
ndb_attr = [(aname, avalue) for aname, avalue in obj.ndb.__dict__.items()]
|
||||
except Exception:
|
||||
ndb_attr = [(None, None)]
|
||||
ndb_attr = None
|
||||
string = ""
|
||||
if db_attr and db_attr[0]:
|
||||
#self.caller.msg(db_attr)
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ def reload_modules():
|
|||
[m.locks.reset() for m in Msg.objects.all()]
|
||||
[c.locks.reset() for c in Channel.objects.all()]
|
||||
at_return = lambda r: cemit_info(" ... @reload: Asynchronous reset loop finished.")
|
||||
at_err = lambda e: cemit_info("%s\n@reload: Asynchronous reset loop exited with an error." % e)
|
||||
at_err = lambda e: cemit_info("%s\nreload: Asynchronous reset loop exited with an error. This might be harmless and just due to some modules or scripts not having had time to restart before being called by the reset loop. Wait a moment then reload again to see if the problem persists." % e)
|
||||
utils.run_async(run_reset_loop, at_return, at_err)
|
||||
|
||||
def reload_scripts(scripts=None, obj=None, key=None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue