Put simulation cleanup code in a try:finally block.

This means that when networks are killed e.g. due to a Node crashing (or in the GUI's case, a node raising an exception to end the simulation) the network is cleaned up nicely.

(p.s. @tcstewar though not as late as my award winning commit I do feel that committing stuff after the end of summer school party deserves some (sad) kudos...)
Shouldn't you be sleeping?

On 21 June 2014 01:33:54 GMT-04:00, Jonathan Heathcote <notifications@github.com> wrote:
>>  
>> -        # Start the IO and perform host computation
>> -        with self.io as node_io:
>> -            self.node_io = node_io
>> -            self.controller.run(self.dao.app_id)
>> -            node_io.start()
>> +            # Retrieve any probed values
>> +            logger.debug("Retrieving data from the board.")
>> +            self.data = dict()
>> +            for p in self.probes:
>> +                self.data[p.probe] =
>p.get_data(self.controller.txrx)
>
>...that or this could be done lazily when the probe's data are
>accessed.
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/ctn-waterloo/nengo_spinnaker/pull/82/files#r14048427