Skip to content

Commit

Permalink
fixup! Implement a basic callback system for calling a custom functio…
Browse files Browse the repository at this point in the history
…n after each iteration.
  • Loading branch information
ftsamis committed Aug 19, 2016
1 parent d863307 commit 1585d7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tardis/simulation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,9 @@ def add_callback(self, cb_func, *args):
The callback ID
"""
self._callbacks[self._cb_next_id] = (cb_func, args)
cb_id = self._cb_next_id
self._cb_next_id += 1
return self._cb_next_id
return cb_id

def remove_callback(self, id):
"""
Expand Down

0 comments on commit 1585d7f

Please sign in to comment.