Set initial 'running' attribute in Network class
authorJud Stephenson <Jud@users.noreply.github.com>
Sun, 8 Dec 2013 22:08:06 +0000 (17:08 -0500)
committerJud Stephenson <Jud@users.noreply.github.com>
Sun, 8 Dec 2013 22:08:06 +0000 (17:08 -0500)
This was causing a AttributeError when network.is_running() was called before the network was started.

lib/network.py

index 5c49042..8d6608a 100644 (file)
@@ -50,6 +50,7 @@ class Network(threading.Thread):
         self.queue = Queue.Queue()
         self.callbacks = {}
         self.protocol = self.config.get('protocol','s')
+        self.running = False
 
         # Server for addresses and transactions
         self.default_server = self.config.get('server')