Multiple fixes and cleanups - command parser excludes inaccessible commands already at parse level now. Fixed the functionality of a few of the lock functions to be more intuitive. Added functionality to the examine command to better show the commands available to an object.

This commit is contained in:
Griatch 2011-06-26 14:35:02 +00:00
parent 334c0b1d08
commit 95d672763b
17 changed files with 207 additions and 165 deletions

View file

@ -123,16 +123,19 @@ class ScriptClass(TypeClass):
#print "... Start cancelled (invalid start or already running)."
return 0 # this is used by validate() for counting started scripts
def stop(self):
def stop(self, kill=False):
"""
Called to stop the script from running.
This also deletes the script.
kill - don't call finishing hooks.
"""
#print "stopping script %s" % self.key
try:
self.at_stop()
except Exception:
logger.log_trace()
if not kill:
try:
self.at_stop()
except Exception:
logger.log_trace()
if self.interval:
try:
self._stop_task()