##// END OF EJS Templates
util: enable "hooks" to return list of the values returned from each hooks
FUJIWARA Katsunori -
r21046:cc13addb default
parent child Browse files
Show More
@@ -1996,8 +1996,10 b' class hooks(object):'
1996
1996
1997 def __call__(self, *args):
1997 def __call__(self, *args):
1998 self._hooks.sort(key=lambda x: x[0])
1998 self._hooks.sort(key=lambda x: x[0])
1999 results = []
1999 for source, hook in self._hooks:
2000 for source, hook in self._hooks:
2000 hook(*args)
2001 results.append(hook(*args))
2002 return results
2001
2003
2002 def debugstacktrace(msg='stacktrace', skip=0, f=sys.stderr, otherf=sys.stdout):
2004 def debugstacktrace(msg='stacktrace', skip=0, f=sys.stderr, otherf=sys.stdout):
2003 '''Writes a message to f (stderr) with a nicely formatted stacktrace.
2005 '''Writes a message to f (stderr) with a nicely formatted stacktrace.
General Comments 0
You need to be logged in to leave comments. Login now