Fixed an unpuppeting bug for bots

This commit is contained in:
Griatch 2015-03-07 15:24:03 +01:00
parent 004b76250f
commit 19b1ef8fc9

View file

@ -317,7 +317,11 @@ class DefaultPlayer(PlayerDB):
# unpuppeting all objects and disconnecting the user, if any
# sessions remain (should usually be handled from the
# deleting command)
self.unpuppet_object(session.sessid)
try:
self.unpuppet_object(session.sessid)
except RuntimeError:
# no puppet to disconnect from
pass
session.sessionhandler.disconnect(session, reason=_("Player being deleted."))
self.scripts.stop()
self.attributes.clear()