SHARE
TWEET

Untitled

a guest Oct 19th, 2012 11 Never
  1. result = func(*args, **kwargs)
  2. if self.catch_returns or self.log_returns:
  3.         if isinstance(result, dict):
  4.                 self.returned(result)
  5.         elif inspect.isgenerator(result) or 'itertools' in str(result.__class__):
  6.                 for x in result:
  7.                         self.returned(x)
  8.                         time.sleep(0.1)
  9.         else:
  10.                 self.returned(result)
RAW Paste Data
Top