Skip to content

Commit

Permalink
check if async exception should be printed for futures
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusZuber committed Feb 5, 2015
1 parent 18bc049 commit ab7c5f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion concert/async.py
Expand Up @@ -215,7 +215,8 @@ def async(func):
@functools.wraps(func)
def _inner(*args, **kwargs):
future = EXECUTOR.submit(func, *args, **kwargs)
future.add_done_callback(print_exception)
if concert.config.ENABLE_PRINT_ASYNC_EXCEPTION:
future.add_done_callback(print_exception)
return future

return _inner
Expand Down

0 comments on commit ab7c5f4

Please sign in to comment.