emonhub/emonhub — pull request #55 by pb66 (2014-07-09 14:34:17+00:00)
Title: Creation & Deletion of Dispatchers and Listeners

Listeners and Dispatchers are only created if 'type' is in settings, therefore if listener or dispatcher not to be created, only the 'type' needs to be commented out to omit rather than every line. this has been extended to tell emonHub to delete the listener or dispatcher if the type is missing.
Fixed an issue with delete that would crash emonHub due to the list changing during iteration by adding .keys
The delete has also been moved ahead of the creation routines to handle single instance issues eg Pi serial port, if a seriallistener is renamed it will be gracefully closed before the new one is created using the same serial port, previously it tried to create a second serial port conn, failed, aborted and moved on to delete the original listener.
Dispatcher creation & deletion routine changed to match listener with exceptin handling (dispatcher class).